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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: xavier dot leune at gmail dot com
New email:
PHP Version: OS:

 

 [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 Sep 20 09:01:26 2019 UTC