Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Essential CGI Security Practices

by pjf (Curate)
on Feb 03, 2002 at 02:07 UTC ( #143002=note: print w/replies, xml ) Need Help??

in reply to Essential CGI Security Practices

I'm occasionally employed to do security audits for programs both written in Perl and in other languages, and there's one mistake that consistantly pops up and earns me my wage. I've had to give the same piece of advice many many times:

If you're dealing with a database, quote your values - properly.

If you're using DBI and placeholders, then you should never have this problem. Alas, I've seen far too much code that will bomb unexpectedly when Ms O'Donnell enters her surname, or will cost thousands when someone requests a username of '; rollback; begin; drop table customers; commit;. (Note the leading tick.)

If you're doing database work and don't know about the DBI module and placeholders, then go and read up on them now. They're worth it. Really.


Paul Fenwick
Perl Training Australia

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://143002]
[1nickt]: I am on MacOSX and there is a sore lack of testing resources for CPANTS I think
[choroba]: Tux Why? It works for me with 16 :-)
[Tux]: and the defailt is 15?
[choroba]: sorry, typo. Works for me with 15 which is the default
[choroba]: Timestamps should work correctly now

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2017-09-19 20:12 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (228 votes). Check out past polls.