diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index e4ea00ac332..4ed0efb820f 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -98,7 +98,7 @@ #include "ext/standard/file.h" /* for php_set_sock_blocking() :-( */ #include "ext/standard/php_smart_str.h" #include "ext/standard/html.h" -#include "ext/standard/url.h" /* for php_url_decode() */ +#include "ext/standard/url.h" /* for php_raw_url_decode() */ #include "ext/standard/php_string.h" /* for php_dirname() */ #include "php_network.h" @@ -1577,7 +1577,7 @@ static void normalize_vpath(char **retval, size_t *retval_len, const char *vpath return; } - decoded_vpath_end = decoded_vpath + php_url_decode(decoded_vpath, vpath_len); + decoded_vpath_end = decoded_vpath + php_raw_url_decode(decoded_vpath, vpath_len); #ifdef PHP_WIN32 { diff --git a/sapi/cli/tests/bug68291.phpt b/sapi/cli/tests/bug68291.phpt new file mode 100644 index 00000000000..62042307c58 --- /dev/null +++ b/sapi/cli/tests/bug68291.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #68291 (404 on urls with '+') +--INI-- +allow_url_fopen=1 +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECT-- +Found