ID:               47501
 User updated by:  gazheyes at gmail dot com
 Reported By:      gazheyes at gmail dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         Strings related
 Operating System: *
 PHP Version:      5.2.8
 New Comment:

Result:-

string(2) "\0"
string(1) " "


Previous Comments:
------------------------------------------------------------------------

[2009-02-25 13:37:33] j...@php.net

Try this script instead:

<?php
var_dump($_GET['x'], stripslashes($_GET['x']));
?>

------------------------------------------------------------------------

[2009-02-25 11:15:51] gazheyes at gmail dot com

Description:
------------
Stripslashes appears to be converting null escapes into a null
character. I've tested other unicode characters from 0 to 100,000 and
only null escapes are converted. IMO you shouldn't be able to decode
null chars from a url like this. 

Marc Zimmerli originally found this bug.

Reproduce code:
---------------
the url contains page.php?x=\0

<?php
echo stripslashes($_GET['x']);
?>

Expected result:
----------------
0

Actual result:
--------------
null


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47501&edit=1

Reply via email to