[LIP] Cleaning of input prior to entering into a database

[email protected]
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <[email protected]>
Hi All,

Do you think this is enough cleaning before entering arbitrary text into
a PostgreSQL database?

        $_ =~ s/'/''/g;
        $_ =~ s/;/\;/g;
        $_ =~ s/insert/isnert/gi;
        $_ =~ s/delete/dleete/gi;
        $_ =~ s/select/sleect/gi;
        $_ =~ s/update/udpate/gi;
        $_ =~ s/drop/rdop/gi;
        $_ =~ s/alter/atler/gi;
        $_ =~ s/grant/garnt/gi;

Thanks,

Binand

-- 
Hanlon's Razor: Never attribute to malice that which can be adequately
explained by stupidity.
Bruce's Razor: Never attribute to stupidity that which can be adequately
explained by Microsoft funding.


-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.