diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2002-05-11 18:50:28 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2002-05-11 18:50:28 +0000 |
commit | 4caca1d6ebff2791bd1cc2348a660fb0fcb18221 (patch) | |
tree | 52e7b559b18b1e907e64dd4fc6b6a00f950373cc | |
parent | 64595cc95953964a8c634715c8d4f6428a9a03be (diff) | |
download | php-git-4caca1d6ebff2791bd1cc2348a660fb0fcb18221.tar.gz |
MFH - safe-mode show_source() fix
-rw-r--r-- | ext/standard/basic_functions.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 2fae423907..26aef54e7b 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -1889,6 +1889,14 @@ PHP_FUNCTION(highlight_file) } convert_to_string(filename); + if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_P(filename), NULL, CHECKUID_ALLOW_ONLY_FILE))) { + RETURN_FALSE; + } + + if (php_check_open_basedir(Z_STRVAL_P(filename) TSRMLS_CC)) { + RETURN_FALSE; + } + if (i) { php_start_ob_buffer (NULL, 0, 1 TSRMLS_CC); } |