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 5FFD352800 for ; Fri, 27 May 2005 13:06:15 -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 28494-07 for ; Fri, 27 May 2005 16:06:10 +0000 (GMT) Received: from basm.cerias.purdue.edu (basm.cerias.purdue.edu [128.10.243.21]) by svr1.postgresql.org (Postfix) with ESMTP id 8801052803 for ; Fri, 27 May 2005 13:06:06 -0300 (ADT) Received: from [128.10.242.60] (lv426.cerias.purdue.edu [128.10.242.60]) by basm.cerias.purdue.edu (8.13.4/8.13.4/PURDUE_CERIAS-2.0) with ESMTP id j4RG64Eh010227; Fri, 27 May 2005 11:06:05 -0500 (EST) Message-ID: <42974583.10207@cerias.purdue.edu> Date: Fri, 27 May 2005 11:06:27 -0500 From: Ed Finkler User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bruno Wolff III , pgsql-php@postgresql.org Subject: Re: Effectiveness of pg_escape_string at blocking SQL injection attacks References: <4297435C.20605@cerias.purdue.edu> <20050527155922.GA3930@wolff.to> In-Reply-To: <20050527155922.GA3930@wolff.to> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.85.1, clamav-milter version 0.85 on basm.cerias.purdue.edu X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200505/37 X-Sequence-Number: 3151 Bruno Wolff III wrote: > The best advice is to use bind parameters rather than trying to build > SQL strings consisting partly of user input. That's good advice, but I suspect not everyone is going to know this, and will have a tendency to use the escaping function to try and clean intput. Do you have any suggestions about improving the security of the pg_escape_string function? -- Ed Finkler Web and Security Archive Administrator CERIAS - Purdue University http://www.cerias.purdue.edu/ v: 765.496.6762 f: 764.496.3181