Re: SQL injection - Mailing list pgsql-general

From Alex Turner
Subject Re: SQL injection
Date
Msg-id 33c6269f0511021912m26c9507mcd01090ba4c20d34@mail.gmail.com
Whole thread Raw
In response to Re: SQL injection  (Matthew Terenzio <matt@jobsforge.com>)
Responses Re: SQL injection
List pgsql-general
Curiously none are security reasons, they are more portability reasons
(and pretty thin ones at that)... but then this is PHP we are talking
about - let me just say register_globals and end it there.

I would have to say that for security purposes - I would want magic
quotes _on_ rather than off for the whole reasons of SQL Injection
that we already talked about.  Generally most scripts I write spend
more time sending data to the DB then re-reading straight from the DB
rather than re-using data pushed through POST/GET, and the functions
that are exceptions auto unescape the data again for me...

Alex

On 11/2/05, Matthew Terenzio <matt@jobsforge.com> wrote:
>
> On Nov 2, 2005, at 6:08 PM, Michael Glaesemann wrote:
>
> > As an aside, it's interesting to see that the PHP documentation states:
> > ---
> > Magic Quotes is a process that automagically escapes incoming data to
> > the PHP script. It's preferred to code with magic quotes off and to
> > instead escape the data at runtime, as needed.
> Haven't been totally immersed in this thread but here are reasons given
> for not using Magic Quotes:
>
> http://us2.php.net/manual/en/security.magicquotes.whynot.php
>
> And here is pg_escape_string() :
>
> http://us3.php.net/manual/en/function.pg-escape-string.php
>
>

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Changing ids conflicting with serial values?
Next
From: David Gagnon
Date:
Subject: Problem with array in plpgsql function .. please help :-)