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