Re: Re: DB wildcards
| From: | Justin Patrin | Date: | Wed, 18 May 2005 04:54:10 +0000 |
| Subject: | Re: Re: DB wildcards | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19251@lists.php.net to get a copy of this message | ||
On 5/17/05, Danny Brow <dan@fullmotions.com> wrote:
> On Tue, 2005-05-17 at 10:04 +0200, Massimiliano Arione wrote:
> > Danny Brow wrote:
> > >>Why dangerous?
> > >>The DB provides atuomating quote and escape of values putted in
> > >>placeholfers.
> > >
> > > Because some one can do an sql injection attack. I get this warning
> > > every time I post a question, but either I've removed the extra code to
> > > make it easier to read or have not yet started to make my code secure..
> >
> > Don't you think that escaping strings is enough against sql injection?
> >
>
> I don't think anything is enough, the app I'm developing, if it all
> works out will be in environments where data is sensitive enough to have
> laws that govern it's use and distribution. It's not military either,
> but it's important stuff.
>
> Escaping strings needs to be done before it hits the DB, or you could
> get an attack like:
>
> ' or '' = ' in a password field or something like that. I not a pro in
> php or sql yet. I bet there are a million examples of why sql statements
> need to be purified via php first.
>
There's always my FAQ on the matter. ;-)
http://pear.reversefold.com/dokuwiki/doku.php?id=phpfaqs
--
Justin Patrin