bug43008.phpt 573 B

123456789101112131415161718192021
  1. --TEST--
  2. Bug #43008 (php://filter uris ignore url encoded filternames and can't handle slashes)
  3. --SKIPIF--
  4. <?php
  5. if (!extension_loaded("iconv")) die("skip iconv extension not available");
  6. ?>
  7. --INI--
  8. allow_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";
  18. var_dump(urlencode(file_get_contents($url)));
  19. ?>
  20. --EXPECTF--
  21. string(8) "foob%E2r"