Bug #18322 Updated: Can't add words with "'" in my PEAR account userinfo

From: Date: Sat, 13 Jul 2002 08:24:22 +0000
Subject: Bug #18322 Updated: Can't add words with "'" in my PEAR account userinfo
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-7701@lists.php.net to get a copy of this message
ID: 18322 Updated by: mj@php.net Reported By: floripa@php.net -Status: Open +Status: Closed Bug Type: PEAR related Operating System: FreeBSD 4.6-STABLE PHP Version: 4.2.1 New Comment: This bug has been fixed in CVS. You can grab a snapshot of the CVS version at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-07-12 20:12:43] floripa@php.net --- account-edit.php Sun Jun 9 19:48:47 2002 +++ fixed/account-edit.php Fri Jul 12 21:02:20 2002 @@ -57,7 +57,7 @@ $HTTP_POST_VARS['name'], $HTTP_POST_VARS['email'], $HTTP_POST_VARS['homepage'], - $HTTP_POST_VARS['userinfo'], + addslashes ($HTTP_POST_VARS['userinfo']), $HTTP_POST_VARS['wishlist'], isset($HTTP_POST_VARS['showemail']) ? 1 : 0, isset($HTTP_POST_VARS['admin']) ? 1 : 0); ------------------------------------------------------------------------ [2002-07-12 19:39:17] floripa@php.net I tried to edit my PEAR account and got this error. Nothing that an "addslashes()" don't fix. ;) Error: DB Error: syntax error: UPDATE users SET name = 'Antônio Carlos Venâncio Júnior', email = 'floripa@organiKa.com.br', homepage = '', userinfo = '"Can't buy what I want because its FREE!" Pearl Jam', wishlist = '', showemail = '1', admin = '0' WHERE handle = 'antonio' [nativecode=1064 ** You have an error in your SQL syntax near 't buy what I want because its FREE!" Pearl Jam', wishlist = '', showemail = '1'' at line 1] ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18322&edit=1

« previous php.pear.dev (#7701) next »