Merge branch 'PHP-5.6'

* PHP-5.6:
  Fix #70264: CLI server directory traversal
This commit is contained in:
Christoph M. Becker 2015-08-14 17:18:35 +02:00
commit fc444896af
2 changed files with 33 additions and 0 deletions

View file

@ -1469,6 +1469,18 @@ static void normalize_vpath(char **retval, size_t *retval_len, const char *vpath
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 == '/') {