Fixed bug #37987 (invalid return of file_exists() in safe mode).

This commit is contained in:
Ilia Alshanetsky 2006-07-02 13:51:40 +00:00
parent 7af33194e5
commit 1b2cc459c6
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -74,6 +74,7 @@ PHP NEWS
- Fixed memory leaks in openssl streams context options. (Pierre)
- Fixed handling of extremely long paths inside tempnam() function. (Ilia)
- Fixed bug #37987 (invalid return of file_exists() in safe mode). (Ilia)
- Fixed bug #37931 (possible crash in OCI8 after database restart
when using persistent connections). (Tony)
- Fixed bug #37920 (compilation problems on z/OS). (Tony)

View File

@ -660,7 +660,7 @@ PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int typ
}
if ((wrapper = php_stream_locate_url_wrapper(filename, &local, 0 TSRMLS_CC)) == &php_plain_files_wrapper) {
if (php_check_open_basedir(local TSRMLS_CC)) {
if (php_check_open_basedir(local TSRMLS_CC) || (PG(safe_mode) && !php_checkuid_ex(filename, NULL, CHECKUID_ALLOW_FILE_NOT_EXISTS, CHECKUID_NO_ERRORS))) {
RETURN_FALSE;
}
}