Bug #67612 [Opn->Fbk]: Unable to handle passwords with certain characters

From: Date: Fri, 10 Jul 2015 13:27:58 +0000
Subject: Bug #67612 [Opn->Fbk]: Unable to handle passwords with certain characters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-194307@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67612&edit=1

 ID:                 67612
 Updated by:         tyrael@php.net
 Reported by:        twood at edao dot biz
 Summary:            Unable to handle passwords with certain characters
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            PDO MySQL
 Operating System:   Ubuntu 14
-PHP Version:        str_size_and_int64 branch
+PHP Version:        master
 Block user comment: N
 Private report:     N

 New Comment:

Can you still reproduce the problem with the laster PHP7 qa release?


Previous Comments:
------------------------------------------------------------------------
[2014-07-13 23:08:54] twood at edao dot biz

Description:
------------
Attempting to connect to a mysql database with a password containing ")!" (e.g. 1234)!56)
fails as if it is the wrong password.

Connecting to MySql directly (at the command line) with the same username and password works.

When the password is changed --just by removing the two characters-- connections at both the command
line and from php work.


PHP version 5.5.9-1ubuntu4.3
mysql  Ver 14.14 Distrib 5.5.37, for debian-linux-gnu (x86_64) using readline 6.3
Both running on the same machine

Test script:
---------------
define('DB_HOST', 'localhost');
define('DB_NAME', 'nootcards');
define('DB_USERNAME', 'nootsite');
define('DB_PASSWORD', '3kDo3)!9a4X');
# Alphanumerics characters have been changed from the actual password
# but the password contains exactly the same number of passwords
# as the one that results in a failed connection



try {
	$dbh = new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME, DB_USERNAME,
DB_PASSWORD);
} catch (PDOException $e) {
	return returnResult( 1000, "Database error: " . $e->getMessage() );
}



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=67612&edit=1


Thread (3 messages)

« previous php.bugs (#194307) next »