diff options
author | Sara Golemon <pollita@php.net> | 2003-01-09 21:57:45 +0000 |
---|---|---|
committer | Sara Golemon <pollita@php.net> | 2003-01-09 21:57:45 +0000 |
commit | 4d789b593fafde0968b3a7cc282661018caf7594 (patch) | |
tree | 15b0b1d8d2324ab8a5eaa7e0d1d522d9e00298a7 /ext/standard/filestat.c | |
parent | 82c6d54517cff2f96140f08c8c8bbab77d3bf219 (diff) | |
download | php-git-4d789b593fafde0968b3a7cc282661018caf7594.tar.gz |
Bug #21531 file_exists() and other filestat functions throw errors when in safe mode and file/directory does not exist.
Extended php_checkuid function to add "flags" field via rename to php_checkuid_ex with alias for BC in functions that do want safe mode errors thrown.
Diffstat (limited to 'ext/standard/filestat.c')
-rw-r--r-- | ext/standard/filestat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 67313eff12..349e4222d8 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -564,7 +564,7 @@ static void php_stat(const char *filename, php_stat_len filename_length, int typ char *stat_sb_names[13]={"dev", "ino", "mode", "nlink", "uid", "gid", "rdev", "size", "atime", "mtime", "ctime", "blksize", "blocks"}; - if (PG(safe_mode) &&(!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + if (PG(safe_mode) &&(!php_checkuid_ex(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR, IS_EXISTS_CHECK(type) ? CHECKUID_NO_ERRORS : 0))) { RETURN_FALSE; } |