xref: /PHP-8.0/ext/filter/tests/bug49184.phpt (revision 61330b0f)
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--
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