xref: /PHP-5.4/ext/filter/tests/bug49184.phpt (revision 37a13d2d)
1--TEST--
2Bug #67296 (filter_input doesn't validate variables)
3--XFAIL--
4See Bug #49184
5--SKIPIF--
6<?php if (!extension_loaded("filter")) die("skip needs filter ext"); ?>
7--ENV--
8return <<<END
9HTTP_X_FORWARDED_FOR=example.com
10END;
11--FILE--
12<?php
13  var_dump(filter_input(INPUT_SERVER, "HTTP_X_FORWARDED_FOR", FILTER_UNSAFE_RAW));
14  var_dump($_SERVER["HTTP_X_FORWARDED_FOR"]);
15  var_dump(getenv("HTTP_X_FORWARDED_FOR"));
16  var_dump("done");
17?>
18--EXPECT--
19string(11) "example.com"
20string(11) "example.com"
21string(11) "example.com"
22string(4) "done"
23