Patch bug39863.phpt for *General Issues Bug #39863
Patch version 2010-05-12 11:23 UTC
Return to Bug #39863 |
Download this patch
Patch Revisions:
Developer: vanderaj@owasp.org
--TEST--
Test for null byte truncation in file_include on Unix platforms
--CREDITS--
Andrew van der Stock, vanderaj @ owasp.org
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') die("skip this test is for non-Windows platforms only");
?>
--FILE--
<?php
$filename = "/etc/passwd" . chr(0). ".ridiculous";
if (file_exists($filename))
{
echo "FAIL";
}
else
{
echo "PASS";
}
?>
--EXPECT--
string(4) "PASS"
|