Bug #68963 [NEW]: Error handler output is not binary safe
| From: | mails at thomasbley dot de | Date: | Sat, 31 Jan 2015 09:30:46 +0000 |
| Subject: | Bug #68963 [NEW]: Error handler output is not binary safe | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-190364@lists.php.net to get a copy of this message | ||
From: mails at thomasbley dot de
Operating system: Ubuntu 14.04.1 LTS
PHP version: 5.5.21
Package: *General Issues
Bug Type: Bug
Bug description:Error handler output is not binary safe
Description:
------------
Accessing undefined object members gives a wrong notice message if the
member contains a zero byte. The problem occurs in real code when
request parameters are put as members in controller or request objects.
Test script:
---------------
<?php
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
$obj = new stdclass();
echo $obj->{"foo\0bar"};
$obj->{"foo\0bar"} = 1;
echo $obj->{"foo\0bar"};
Expected result:
----------------
sapi/cli/php /tmp/test.php
Notice: Undefined property: stdClass::$foobar in /tmp/test.php on line
6
1
Actual result:
--------------
sapi/cli/php /tmp/test.php
Notice: Undefined property: stdClass::$foo in /tmp/test.php on line 6
1
--
Edit bug report at https://bugs.php.net/bug.php?id=68963&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68963&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68963&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68963&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68963&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68963&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68963&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68963&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68963&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68963&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68963&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68963&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68963&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68963&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68963&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68963&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68963&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68963&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68963&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68963&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68963&r=mysqlcfg