p = php_strtok_r(filterlist, "|", &token);
while (p) {
+ php_url_decode(p, strlen(p));
if (read_chain) {
if ((temp_filter = php_stream_filter_create(p, NULL, php_stream_is_persistent(stream) TSRMLS_CC))) {
php_stream_filter_append(&stream->readfilters, temp_filter);
--- /dev/null
+--TEST--
+Bug #43008 (php://filter uris ignore url encoded filternames and can't handle slashes)
+--FILE--
+<?php
+$url = b""
+ . b"php://filter/read="
+ . urlencode(b"convert.iconv.ISO-8859-15/UTF-8")
+ . b'|' . urlencode(b"string.rot13")
+ . b'|' . urlencode(b"string.rot13")
+ . b'|' . urlencode(b"convert.iconv.UTF-8/ISO-8859-15")
+ . b"/resource=data://text/plain,foob%E2r";
+var_dump(urlencode(file_get_contents($url)));
+?>
+--EXPECTF--
+string(8) "foob%E2r"