diff options
author | Ondřej Surý <ondrej@sury.org> | 2014-08-01 11:17:13 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2014-08-01 11:17:13 +0200 |
commit | b60f6e95a473d1ae97fdf20cec4cfefc06b24ec2 (patch) | |
tree | e92e8d3c102992bc63eae4327d3498e7203a9168 /ext/filter | |
parent | 09ed144817606a3a835391b12455e6d9cb3a0ae2 (diff) | |
download | php-b60f6e95a473d1ae97fdf20cec4cfefc06b24ec2.tar.gz |
New upstream version 5.6.0~rc3+dfsgupstream/5.6.0_rc3+dfsg
Diffstat (limited to 'ext/filter')
-rw-r--r-- | ext/filter/tests/bug49184.phpt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/filter/tests/bug49184.phpt b/ext/filter/tests/bug49184.phpt new file mode 100644 index 000000000..86d35db0d --- /dev/null +++ b/ext/filter/tests/bug49184.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #67296 (filter_input doesn't validate variables) +--XFAIL-- +See Bug #49184 +--SKIPIF-- +<?php if (!extension_loaded("filter")) die("skip needs filter ext"); ?> +--ENV-- +return <<<END +HTTP_X_FORWARDED_FOR=example.com +END; +--FILE-- +<?php + var_dump(filter_input(INPUT_SERVER, "HTTP_X_FORWARDED_FOR", FILTER_UNSAFE_RAW)); + var_dump($_SERVER["HTTP_X_FORWARDED_FOR"]); + var_dump(getenv("HTTP_X_FORWARDED_FOR")); + var_dump("done"); +?> +--EXPECT-- +string(11) "example.com" +string(11) "example.com" +string(11) "example.com" +string(4) "done" |