diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-10-04 23:20:54 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-10-04 23:20:54 +0000 |
commit | 4492d8f089d3db2d53cd91fa632ce94e6b697002 (patch) | |
tree | 95e6b13b394f2a517188a17aa2c3db49101dd8cd /ext/standard/dir.c | |
parent | f630127685fa64d81cf5a88d3ff9999c50737682 (diff) | |
download | php-git-4492d8f089d3db2d53cd91fa632ce94e6b697002.tar.gz |
MFB: Fixed missing open_basedir check inside chdir() function.
Diffstat (limited to 'ext/standard/dir.c')
-rw-r--r-- | ext/standard/dir.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/standard/dir.c b/ext/standard/dir.c index a8152b851c..741ff2e912 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -310,7 +310,9 @@ PHP_FUNCTION(chdir) php_stream_path_param_encode(ppstr, &str, &str_len, REPORT_ERRORS, FG(default_context)) == FAILURE) { return; } - + if (php_check_open_basedir(str TSRMLS_CC)) { + RETURN_FALSE; + } ret = VCWD_CHDIR(str); if (ret != 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s (errno %d)", strerror(errno), errno); |