Fixed safe_mode validation inside tempnam() when the directory path does not end with a /).

This commit is contained in:
Ilia Alshanetsky 2010-02-11 12:32:21 +00:00
parent e2b9a01e70
commit ad9bbf26ab
2 changed files with 3 additions and 1 deletions

2
NEWS
View file

@ -15,6 +15,8 @@ PHP NEWS
- Added stream filter support to mcrypt extension (ported from
mcrypt_filter). (Stas)
- Fixed safe_mode validation inside tempnam() when the directory path does
not end with a /). (Martin Jansen)
- Fixed a possible open_basedir/safe_mode bypass in session extension
identified by Grzegorz Stachowiak. (Ilia)
- Fixed possible crash when a error/warning is raised during php startup.

View file

@ -836,7 +836,7 @@ PHP_FUNCTION(tempnam)
return;
}
if (PG(safe_mode) &&(!php_checkuid(dir, NULL, CHECKUID_ALLOW_ONLY_DIR))) {
if (PG(safe_mode) &&(!php_checkuid(dir, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
RETURN_FALSE;
}