php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #47358
Patch open_basedir_error_fix revision 2011-10-09 17:08 UTC by pajoye@php.net
revision 2011-10-09 16:50 UTC by pajoye@php.net

Patch open_basedir_error_fix for Safe Mode/open_basedir Bug #47358

Patch version 2011-10-09 17:08 UTC

Return to Bug #47358 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: pajoye@php.net

Index: ext/standard/dir.c
===================================================================
--- ext/standard/dir.c	(revision 317752)
+++ ext/standard/dir.c	(working copy)
@@ -490,11 +490,10 @@
 
 	/* now catch the FreeBSD style of "no matches" */
 	if (!globbuf.gl_pathc || !globbuf.gl_pathv) {
+
 no_results:
 		if (PG(open_basedir) && *PG(open_basedir)) {
-			struct stat s;
-
-			if (0 != VCWD_STAT(pattern, &s) || S_IFDIR != (s.st_mode & S_IFMT)) {
+			if (php_check_open_basedir_ex(pattern, 0 TSRMLS_CC)) {
 				RETURN_FALSE;
 			}
 		}
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Aug 21 02:01:27 2019 UTC