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 82D9D52809 for ; Fri, 27 May 2005 12:57:10 -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 24275-09 for ; Fri, 27 May 2005 15:57:04 +0000 (GMT) Received: from basm.cerias.purdue.edu (basm.cerias.purdue.edu [128.10.243.21]) by svr1.postgresql.org (Postfix) with ESMTP id 97A7F52836 for ; Fri, 27 May 2005 12:57:02 -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 j4RFusEJ007766 for ; Fri, 27 May 2005 10:56:57 -0500 (EST) Message-ID: <4297435C.20605@cerias.purdue.edu> Date: Fri, 27 May 2005 10:57:16 -0500 From: Ed Finkler User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-php@postgresql.org Subject: Effectiveness of pg_escape_string at blocking SQL injection attacks 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/35 X-Sequence-Number: 3149 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.) Thanks! -- Ed Finkler Web and Security Archive Administrator CERIAS - Purdue University http://www.cerias.purdue.edu/ v: 765.496.6762 f: 764.496.3181