From: Bruno Wolff III <bruno@wolff.to>
To: Ed Finkler <coj@cerias.purdue.edu>
Cc: pgsql-php@postgresql.org
Subject: Re: Effectiveness of pg_escape_string at blocking SQL injection attacks
Date: Fri, 27 May 2005 10:59:22 -0500
Message-ID: <20050527155922.GA3930@wolff.to> (raw)
In-Reply-To: <4297435C.20605@cerias.purdue.edu>
References: <4297435C.20605@cerias.purdue.edu>
On Fri, May 27, 2005 at 10:57:16 -0500,
Ed Finkler <coj@cerias.purdue.edu> wrote:
> Folks,
>
> The php mysql api has a function "mysql_real_escape_string" that seems
> to be able to thwart known SQL injection attacks -- at least the ones of
> which I and other people I've discussed this with know. I am curious to
> know if pg_escape_string is as effective. If not, what would need to be
> modified to make it more effective?
>
> (there is a possibility that I may be able to get a grad student to work
> on this at the center, so detailed responses would be appreciated.)
The best advice is to use bind parameters rather than trying to build
SQL strings consisting partly of user input.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: bruno@wolff.to, coj@cerias.purdue.edu
Subject: Re: Effectiveness of pg_escape_string at blocking SQL injection attacks
In-Reply-To: <20050527155922.GA3930@wolff.to>
References: <4297435C.20605@cerias.purdue.edu> <20050527155922.GA3930@wolff.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox