Req #67206 [NEW]: Hide password in exception stack trace
| From: | sk at computer-leipzig dot com | Date: | Mon, 05 May 2014 10:44:23 +0000 |
| Subject: | Req #67206 [NEW]: Hide password in exception stack trace | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-185628@lists.php.net to get a copy of this message | ||
From: sk at computer-leipzig dot com
Operating system:
PHP version: Irrelevant
Package: PDO Core
Bug Type: Feature/Change Request
Bug description:Hide password in exception stack trace
Description:
------------
Showing the password as default in the stack is for me a little bit
against the philosophy to be a practical web development language. I
have no idea how hard it is mark the password with ****** (6 star signs)
as default, and only when some configuration is changed show the real
password.
I do not verify this, but I expect it is relevant for every database
connection wich is using a password. When it is mysql specific, a the
change should apply to
PDO mysql only.
Expected result:
----------------
[15-Apr-2014 11:28:17] PHP Fatal error: Uncaught exception
'PDOException' with message 'SQLSTATE[HY000] [2002] Can't connect to
local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' in
/opt/ZendFramework-1.10.8/library/Zend/Db/Adapter/Pdo/Abstract.php:129
Stack trace:
#0
/opt/ZendFramework-1.10.8/library/Zend/Db/Adapter/Pdo/Abstract.php(129):
PDO->__construct('mysql:host=loca...', 'a_database', '******',
Array)
#1 /opt/ZendFramework-1.10.8/library/Zend/Db/Adapter/Pdo/Mysql.php(96):
Zend_Db_Adapter_Pdo_Abstract->_connect()
Actual result:
--------------
[15-Apr-2014 11:28:17] PHP Fatal error: Uncaught exception
'PDOException' with message 'SQLSTATE[HY000] [2002] Can't connect to
local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' in
/opt/ZendFramework-1.10.8/library/Zend/Db/Adapter/Pdo/Abstract.php:129
Stack trace:
#0
/opt/ZendFramework-1.10.8/library/Zend/Db/Adapter/Pdo/Abstract.php(129):
PDO->__construct('mysql:host=loca...', 'a_database',
'secure-password',
Array)
#1 /opt/ZendFramework-1.10.8/library/Zend/Db/Adapter/Pdo/Mysql.php(96):
Zend_Db_Adapter_Pdo_Abstract->_connect()
--
Edit bug report at https://bugs.php.net/bug.php?id=67206&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=67206&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=67206&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=67206&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=67206&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=67206&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=67206&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=67206&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=67206&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=67206&r=support
Expected behavior: https://bugs.php.net/fix.php?id=67206&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=67206&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=67206&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=67206&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67206&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=67206&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=67206&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=67206&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67206&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=67206&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=67206&r=mysqlcfg