cvs: php4 /ext/standard dir.c

From: Date: Sun, 03 Mar 2002 20:46:58 +0000
Subject: cvs: php4 /ext/standard dir.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-9609@lists.php.net to get a copy of this message
jflemer Sun Mar 3 15:46:58 2002 EDT Modified files: /php4/ext/standard dir.c Log: (PHP opendir) Added safe_mode checks on path. @- Added safe_mode checks for opendir(). (jflemer) Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.85 php4/ext/standard/dir.c:1.86 --- php4/ext/standard/dir.c:1.85 Thu Feb 28 03:26:44 2002 +++ php4/ext/standard/dir.c Sun Mar 3 15:46:57 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c,v 1.85 2002/02/28 08:26:44 sebastian Exp $ */ +/* $Id: dir.c,v 1.86 2002/03/03 20:46:57 jflemer Exp $ */ /* {{{ includes/startup/misc */ @@ -148,6 +148,10 @@ convert_to_string_ex(arg); if (php_check_open_basedir(Z_STRVAL_PP(arg) TSRMLS_CC)) { + RETURN_FALSE; + } + + if (PG(safe_mode) &&(!php_checkuid(Z_STRVAL_PP(arg), NULL, CHECKUID_ALLOW_ONLY_DIR))) { RETURN_FALSE; }

« previous php.cvs (#9609) next »