X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9194D5290C for ; Sat, 28 May 2005 02:02:11 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 24504-07 for ; Sat, 28 May 2005 05:02:00 +0000 (GMT) Received: from mail1.catalyst.net.nz (godel.catalyst.net.nz [202.49.159.12]) by svr1.postgresql.org (Postfix) with ESMTP id 24BDF528B1 for ; Sat, 28 May 2005 02:01:58 -0300 (ADT) Received: from 222-152-143-241.jetstream.xtra.co.nz ([222.152.143.241] helo=lamb.mcmillan.net.nz) by mail1.catalyst.net.nz with asmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DbtSJ-0000H1-Kr; Sat, 28 May 2005 17:01:51 +1200 Received: from lamb.mcmillan.net.nz (lamb.mcmillan.net.nz [127.0.0.1]) by lamb.mcmillan.net.nz (Postfix) with ESMTP id B35EEAD98581; Sat, 28 May 2005 17:01:20 +1200 (NZST) Subject: Re: Effectiveness of pg_escape_string at blocking SQL From: Andrew McMillan To: Ed Finkler Cc: Volkan YAZICI , pgsql-php@postgresql.org In-Reply-To: <42974BDD.8040807@cerias.purdue.edu> References: <4297435C.20605@cerias.purdue.edu> <7104a737050527092541f9889f@mail.gmail.com> <42974BDD.8040807@cerias.purdue.edu> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-es6fBjKLI9gVHxZomDsp" Date: Sat, 28 May 2005 17:01:20 +1200 Message-Id: <1117256480.30150.172.camel@lamb.mcmillan.net.nz> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200505/42 X-Sequence-Number: 3156 --=-es6fBjKLI9gVHxZomDsp Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2005-05-27 at 11:33 -0500, Ed Finkler wrote: > Volkan YAZICI wrote: >=20 > [snip] >=20 > > If you think, they're not enough for SQL-Injection attacks, I'd advice > > you to patch libpq code, not PHP. >=20 > This is very helpful information. My initial thinking is that this=20 > wouldn't be effective at catching SQL injections, but I'll need to=20 > bounce this off a few other folks. Given the modus operandi of an SQL inject attack, this should be perfectly effective at stopping them. As Bruno said, however, the "bind parameters" approach is a better approach in general. Cheers, Andrew McMillan. ------------------------------------------------------------------------- Andrew @ Catalyst .Net .NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)803-2201 MOB: +64(272)DEBIAN OFFICE: +64(4)499-2267 --=-es6fBjKLI9gVHxZomDsp Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBCl/sgjJA0f48GgBIRAk9eAJ9Q61dLhroPhXxaYErpn5sz4+xL0ACfUwgc rNtmcKgtTmvMtkY44MRCVow= =BlLi -----END PGP SIGNATURE----- --=-es6fBjKLI9gVHxZomDsp--