From: Rasmus Lerdorf Date: Wed, 21 Mar 2012 16:13:06 +0000 (-0700) Subject: Add open_basedir checks to readline_write_history and readline_read_history X-Git-Tag: php-5.3.11RC1~1^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b01a28bad638c3ef5809cdee2127409971f18ff;p=php Add open_basedir checks to readline_write_history and readline_read_history --- diff --git a/ext/readline/readline.c b/ext/readline/readline.c index c514cb8fd0..820e4b456a 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -369,6 +369,10 @@ PHP_FUNCTION(readline_read_history) return; } + if (php_check_open_basedir(arg TSRMLS_CC)) { + RETURN_FALSE; + } + /* XXX from & to NYI */ if (read_history(arg)) { RETURN_FALSE; @@ -389,6 +393,10 @@ PHP_FUNCTION(readline_write_history) return; } + if (php_check_open_basedir(arg TSRMLS_CC)) { + RETURN_FALSE; + } + if (write_history(arg)) { RETURN_FALSE; } else {