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 16:50 UTC

Return to Bug #47358 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions: 2011-10-09 17:08 UTC | 2011-10-09 16:50 UTC

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 @@
 @@ -490,11 +490,11 @@
   
   	/* now catch the FreeBSD style of "no matches" */
   	if (!globbuf.gl_pathc || !globbuf.gl_pathv) {
  +
   no_results:
 +__debugbreak();
   		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)) {
 +			if (php_check_open_basedir_ex(pattern, 1 TSRMLS_CC)) {
   				RETURN_FALSE;
   			}
   		}
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Sep 19 04:01:27 2019 UTC