diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2001-06-20 14:50:17 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2001-06-20 14:50:17 +0000 |
commit | 530833eb7c98062cc7c9bbcda1fe46cad86d87d5 (patch) | |
tree | 893c71fcdd7197b9b3a48b16f57c92eff4935849 | |
parent | 7ed65536c63a73a894a22beb93cca90f69948bf2 (diff) | |
download | php-git-530833eb7c98062cc7c9bbcda1fe46cad86d87d5.tar.gz |
MFH of chdir safe_mode bug fix - in case another RC is rolled then this
fix needs to be in there.
-rw-r--r-- | ext/standard/dir.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 2e1b4605c1..6c9241e36d 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -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) { @@ -364,4 +367,6 @@ PHP_NAMED_FUNCTION(php_if_readdir) * tab-width: 4 * c-basic-offset: 4 * End: + * vim600: sw=4 ts=4 tw=78 fdm=marker + * vim<600: sw=4 ts=4 tw=78 */ |