xref: /PHP-5.6/ext/standard/tests/file/bug43008.phpt (revision 2eacb53f)
1--TEST--
2Bug #43008 (php://filter uris ignore url encoded filternames and can't handle slashes)
3--SKIPIF--
4<?php
5if (!extension_loaded("iconv")) die("skip iconv extension not available");
6?>
7--INI--
8allow_url_fopen=1
9--FILE--
10<?php
11$url = b""
12	. b"php://filter/read="
13	. urlencode(b"convert.iconv.ISO-8859-15/UTF-8")
14	. b'|' . urlencode(b"string.rot13")
15	. b'|' . urlencode(b"string.rot13")
16	. b'|' . urlencode(b"convert.iconv.UTF-8/ISO-8859-15")
17	. b"/resource=data://text/plain,foob%E2r";
18var_dump(urlencode(file_get_contents($url)));
19?>
20--EXPECTF--
21string(8) "foob%E2r"
22