php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75869 Lack of isolation on mysqli_driver->report_mode
Submitted: 2018-01-24 17:52 UTC Modified: -
From: xavier dot leune at gmail dot com Assigned:
Status: Open Package: MySQLi related
PHP Version: 7.2.1 OS: Ubuntu 17.04
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2018-01-24 17:52 UTC] xavier dot leune at gmail dot com
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)

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Dec 13 23:01:23 2019 UTC