X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id ADB66310AE2 for ; Tue, 1 Jul 2003 13:51:11 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 70747-06 for ; Tue, 1 Jul 2003 10:51:00 -0300 (ADT) Received: from mail.zoidtechnologies.com (pcp01923808pcs.canton01.mi.comcast.net [68.43.20.6]) by svr1.postgresql.org (Postfix) with ESMTP id 76F5C310A56 for ; Tue, 1 Jul 2003 10:51:00 -0300 (ADT) Received: by mail.zoidtechnologies.com (Postfix, from userid 500) id 89718C1930; Tue, 1 Jul 2003 09:51:00 -0400 (EDT) Date: Tue, 1 Jul 2003 09:51:00 -0400 From: Jeff To: Frank Bax Cc: pgsql-php@postgresql.org Subject: Re: PHP form Creates Blank DB entries Message-ID: <20030701135100.GA9208@zoidtechnologies.com> References: <3EC8256A-AB16-11D7-8634-00039308EB2C@hwcn.org> <5.2.1.1.0.20030630131653.00aa7df0@pop6.sympatico.ca> <20030630222259.GI1614@zoidtechnologies.com> <20030701134657.GA1999@wolff.to> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030701134657.GA1999@wolff.to> User-Agent: Mutt/1.4.1i X-Archive-Number: 200307/4 X-Sequence-Number: 2116 On Tue, Jul 01, 2003 at 08:46:57AM -0500, Bruno Wolff III wrote: > Date: Tue, 1 Jul 2003 08:46:57 -0500 > From: Bruno Wolff III > To: Jeff > Cc: Frank Bax , pgsql-php@postgresql.org > Subject: Re: [PHP] PHP form Creates Blank DB entries > Mail-Followup-To: Jeff , > Frank Bax , pgsql-php@postgresql.org > > On Mon, Jun 30, 2003 at 18:22:59 -0400, > Jeff wrote: > > > > also, I would suggest running each of the variables through a function that > > strips out html tags (since you don't really care about allowing them in > > this case, right?).. you can do that with strip_tags.. see > > http://php.net/strip_tags > > Wouldn't it be better to replace <, >, " and & with <, >, " and > &, resprectively since those characters could legitimately appear > in at least some of those strings? yes, preparestring handles not only the call to strip_tags, but a call to htmlentities as well, which covers the above. I did not indicate this fact clearly in my email-- I apologize for being misleading. if I've missed anything, please let me know.. I think I have all the bases covered, but I'm willing to make changes if there is some glaring hole (or even a not-so-glaring one) I have missed :) you can check the eros tarball, common.php, the function is called preparestring. regards, J -- || Jeff - http://zoidtechnologies.com/ || GNUPG Fingerprint: A607 0F19 7C75 1305 67E4 BDFF 26BD 606E 3517 2A42