Re: Sql injection attacks - Mailing list pgsql-general

From B. van Ouwerkerk
Subject Re: Sql injection attacks
Date
Msg-id 6.0.0.22.0.20040729123957.02ac5b70@pop.atz.nl
Whole thread Raw
In response to Re: Sql injection attacks  (Harald Fuchs <hf0722x@protecting.net>)
List pgsql-general
> > That can be confirmed by setting $dbh->trace_level to something greater
> or equal
> > than 2 and looking at the Pg DBD driver's output.
>
>Shit, you're right.  The $dbh->quote() called for the placeholders
>escapes strings for INSERTing, but not for LIKE comparisons.  So this
>is one of the few places where using placeholders is not enough.
>
>At least my erroneous assumption can't be used for an SQL injection
>attack - you just get more results than you would get if you escape
>the wildcards by hand.

I've been reading this discussion and I asked myself whether you guys
remove/replace unwanted chars from strings you get from the web or not..

If you do remove them AFAIK it doesn't only prevent SQL injection but also XSS.



B.


pgsql-general by date:

Previous
From: Harald Fuchs
Date:
Subject: Re: Sql injection attacks
Next
From: Elie Nacache
Date:
Subject: how to limit user to open another session