From 726db3f295d85496564581e76d4a78bc5acbc735 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 10 Dec 2010 12:50:25 +0000 Subject: Fixed bug #53516 (Regression in open_basedir handling). --- NEWS | 1 + main/fopen_wrappers.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index b3364d3cd8..d63ddf57f2 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 5.2.16 +- Fixed bug #53516 (Regression in open_basedir handling). (Ilia) 09 Dec 2010, PHP 5.2.15 - Fixed extract() to do not overwrite $GLOBALS and $this when using diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 60452287c3..f8c33707c8 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -192,7 +192,7 @@ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path if (strncmp(resolved_basedir, resolved_name, resolved_basedir_len) == 0) { #endif if (resolved_name_len > resolved_basedir_len && - resolved_name[resolved_basedir_len] != PHP_DIR_SEPARATOR) { + resolved_name[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { return -1; } else { /* File is in the right directory */ -- cgit v1.2.1