com php-src: Merge branch 'PHP-5.6': sapi/cli/php_cli_serve r.c
| From: | Christoph Michael Becker | Date: | Fri, 14 Aug 2015 15:18:35 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.6': sapi/cli/php_cli_serve r.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88540@lists.php.net to get a copy of this message | ||
Commit: fc444896af3bfd6c051913b6f0db49f3376e586b
Author: Christoph M. Becker <cmb@php.net> Fri, 14 Aug 2015 17:18:35 +0200
Parents: 2af19fb50a593faaba53a8b0980bae93e89fbbb2 23d0b938930717c54e77e56c0985a8e47b3a79ae
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fc444896af3bfd6c051913b6f0db49f3376e586b
Log:
Merge branch 'PHP-5.6'
* PHP-5.6:
Fix #70264: CLI server directory traversal
Bugs:
https://bugs.php.net/70264
Changed paths:
MM sapi/cli/php_cli_server.c
Diff:
diff --cc sapi/cli/php_cli_server.c
index 9c00fa0,e4ea00a..709154d
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@@ -1467,8 -1577,20 +1467,20 @@@ static void normalize_vpath(char **retv
return;
}
- decoded_vpath_end = decoded_vpath + php_url_decode(decoded_vpath, vpath_len);
+ decoded_vpath_end = decoded_vpath + php_url_decode(decoded_vpath, (int)vpath_len);
+ #ifdef PHP_WIN32
+ {
+ char *p = decoded_vpath;
+
+ do {
+ if (*p == '\\') {
+ *p = '/';
+ }
+ } while (*p++);
+ }
+ #endif
+
p = decoded_vpath;
if (p < decoded_vpath_end && *p == '/') {