Bug #70894 [Com]: Null bytes in exception messages truncate them on string cast
| From: | nicolasgrekas@php.net | Date: | Thu, 11 Feb 2021 15:08:19 +0000 |
| Subject: | Bug #70894 [Com]: Null bytes in exception messages truncate them on string cast | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-232061@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70894&edit=1
ID: 70894
Comment by: nicolasgrekas@php.net
Reported by: me at kelunik dot com
Summary: Null bytes in exception messages truncate them on
string cast
Status: Open
Type: Bug
Package: Scripting Engine problem
Operating System: any
PHP Version: ANY
Block user comment: N
Private report: N
New Comment:
Related To: Bug #61804
Previous Comments:
------------------------------------------------------------------------
[2019-02-08 04:48:03] requinix@php.net
Related To: Bug #77583
------------------------------------------------------------------------
[2017-12-06 22:56:01] nikic@php.net
Related To: Bug #74999
------------------------------------------------------------------------
[2015-11-11 17:08:42] me at kelunik dot com
Description:
------------
Null bytes in exception messages truncate the messages when the exception is casted to a string.
Affects also older versions of PHP.
Test script:
---------------
https://3v4l.org/JldYh
Expected result:
----------------
string(52) "Exception: bar foo in /in/JldYh:3
Stack trace:
#0 {main}foo"
Actual result:
--------------
string(52) "Exception: in /in/JldYh:3
Stack trace:
#0 {main}foo"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70894&edit=1