From:             darkspirit at strefaphp dot net
Operating system: WindowsXp Home SP2
PHP version:      5.1.0RC1
PHP Bug Type:     PDO related
Bug description:  Showing database's pass in PDOException

Description:
------------
While constructing PDO object and trying to connect with database, in case
something goes wrong, an exception is reportted. Everything is ok unless
you want to display trace of exception or exception's object. In this case
all required information for connecting with database are displayed.

Reproduce code:
---------------
    catch (PDOException $e)
    {
       echo $e -> getTrace();
       echo $e; 
    }

Expected result:
----------------
exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access
denied for user: '[EMAIL PROTECTED]' (Using password: YES)' in
c:\htdocs\opb\opb\includes\main.php:146 Stack trace: #0
c:\htdocs\opb\opb\includes\main.php(146):
PDO->__construct('mysql:dbname=op...', 'root', 'password') #1
c:\htdocs\opb\opb\index.php5(30): OPB->execute('index') #2 {main}


-- 
Edit bug report at http://bugs.php.net/?id=34628&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34628&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34628&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34628&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34628&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34628&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34628&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34628&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34628&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34628&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34628&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=34628&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=34628&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34628&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34628&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34628&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34628&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34628&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34628&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34628&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34628&r=mysqlcfg

Reply via email to