summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2010-12-10 12:50:25 +0000
committerIlia Alshanetsky <iliaa@php.net>2010-12-10 12:50:25 +0000
commit726db3f295d85496564581e76d4a78bc5acbc735 (patch)
treef91f6ee2ecd646f5f2501629524084f4c76c6c02
parent20d7d216a9d43a2b1b145e5c40ba9f3d4ba896a7 (diff)
downloadphp-git-726db3f295d85496564581e76d4a78bc5acbc735.tar.gz
Fixed bug #53516 (Regression in open_basedir handling).
-rw-r--r--NEWS1
-rw-r--r--main/fopen_wrappers.c2
2 files changed, 2 insertions, 1 deletions
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 */