Bug #75869 [NEW]: Lack of isolation on mysqli_driver->report_mode

From: Date: Wed, 24 Jan 2018 17:52:57 +0000
Subject: Bug #75869 [NEW]: Lack of isolation on mysqli_driver->report_mode
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213692@lists.php.net to get a copy of this message
From: xavier dot leune at gmail dot com Operating system: Ubuntu 17.04 PHP version: 7.2.1 Package: MySQLi related Bug Type: Bug Bug description:Lack of isolation on mysqli_driver->report_mode Description: ------------ Hi there, When changing the report_mode of an instance of mysqli_driver, all instances (already created or future instances) will share the same value of report_mode. This can be very annoying when a 3rd party library enables the exceptions on mysqli, if some other 3rd party library makes the assumption that the report_mode is to it's default value. Thanks, Xavier. Test script: --------------- https://gist.github.com/xavierleune/8cde9fc97ea7136d425a1d63cbb974fb Expected result: ---------------- $tainted->report_mode: int(2) $original->report_mode: int(0) Actual result: -------------- $tainted->report_mode: int(2) $original->report_mode: int(2) -- Edit bug report at https://bugs.php.net/bug.php?id=75869&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75869&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75869&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75869&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75869&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75869&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75869&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75869&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75869&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75869&r=support Expected behavior: https://bugs.php.net/fix.php?id=75869&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75869&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75869&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75869&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75869&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75869&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75869&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75869&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75869&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75869&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75869&r=mysqlcfg

« previous php.bugs (#213692) next »