]> granicus.if.org Git - php/commitdiff
- Make iconv filter accept '.' as the delimiter between encoding names as well
authorMoriyoshi Koizumi <moriyoshi@php.net>
Tue, 17 Mar 2009 05:27:00 +0000 (05:27 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Tue, 17 Mar 2009 05:27:00 +0000 (05:27 +0000)
  as '/'. It's impossible to specify the filter in php://filter without this
  fix.

ext/iconv/iconv.c

index f2c6b791817e09d7ba9cedf51d2311b300fdfa50..cc501824b10dea9e8c8126c93fd9632899d2f6f2 100644 (file)
@@ -2850,7 +2850,7 @@ static php_stream_filter *php_iconv_stream_filter_factory_create(const char *nam
                return NULL;
        }
        ++from_charset;
-       if ((to_charset = strchr(from_charset, '/')) == NULL) {
+       if ((to_charset = strpbrk(from_charset, "/.")) == NULL) {
                return NULL;
        }
        from_charset_len = to_charset - from_charset;