Skip to content

Commit

Permalink
Fix for #11570
Browse files Browse the repository at this point in the history
  • Loading branch information
rlerdorf committed Jun 20, 2001
1 parent d0fba81 commit 94897ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/standard/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ PHP_FUNCTION(chdir)
}
convert_to_string_ex(arg);

if (PG(safe_mode) && !php_checkuid((*arg)->value.str.val, NULL, CHECKUID_ALLOW_ONLY_DIR)) {
RETURN_FALSE;
}
ret = VCWD_CHDIR((*arg)->value.str.val);

if (ret != 0) {
Expand Down

0 comments on commit 94897ef

Please sign in to comment.