php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43635 php_mysql.c password handling incorrect
Submitted: 2007-12-19 10:47 UTC Modified: 2007-12-20 00:32 UTC
From: jost_boekemeier at yahoo dot de Assigned:
Status: Closed Package: MySQL related
PHP Version: 5.2.5 OS: Any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jost_boekemeier at yahoo dot de
New email:
PHP Version: OS:

 

 [2007-12-19 10:47 UTC] jost_boekemeier at yahoo dot de
Description:
------------
The following code from php_mysql.c trashes the default_password,
obtained from the php.ini file.

passwd = MySG(default_password);
...
case 3: {

convert_to_string_ex(z_user);
convert_to_string_ex(z_passwd);
user = Z_STRVAL_PP(z_user);
passwd = Z_STRVAL_PP(z_passwd);
}


Reproduce code:
---------------
Set the mysql default password in the php.ini file and call mysql connect as follows:

mysql(foo, bar, null, TRUE);



Expected result:
----------------
passwd should not be set if argument is null.



Actual result:
--------------
Empty password is send to mysql.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-20 00:32 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Fri Oct 19 07:01:25 2018 UTC