|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18322 Can't add words with "'" in my PEAR account userinfo
Submitted: 2002-07-12 19:39 UTC Modified: 2002-07-13 04:24 UTC
From: Assigned:
Status: Closed Package: PEAR related
PHP Version: 4.2.1 OS: FreeBSD 4.6-STABLE
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2002-07-12 19:39 UTC]
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 = '', 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]


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-12 20:12 UTC]
--- 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['userinfo'],
+                         addslashes ($HTTP_POST_VARS['userinfo']),
                          isset($HTTP_POST_VARS['showemail']) ? 1 : 0,
                          isset($HTTP_POST_VARS['admin']) ? 1 : 0);

 [2002-07-13 04:24 UTC]
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at In case this was a documentation 
problem, the fix will show up soon at
In case this was a website problem, the change will show
up on the site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

 [2014-02-28 17:16 UTC]
Automatic comment on behalf of mj
Log: Fix bug #18322.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Aug 02 19:01:25 2021 UTC