From: Ilia Alshanetsky Date: Wed, 4 Oct 2006 23:20:54 +0000 (+0000) Subject: MFB: Fixed missing open_basedir check inside chdir() function. X-Git-Tag: RELEASE_1_0_0RC1~1417 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4492d8f089d3db2d53cd91fa632ce94e6b697002;p=php MFB: Fixed missing open_basedir check inside chdir() function. --- 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);