summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2012-03-21 09:13:06 -0700
committerRasmus Lerdorf <rasmus@php.net>2012-03-21 09:13:06 -0700
commit8b01a28bad638c3ef5809cdee2127409971f18ff (patch)
tree0a5a1bdfe8b2e9d3870d7bdaaf01464dc13897db
parent887ee455dc2059a3154ee1173e2b973932067743 (diff)
downloadphp-git-8b01a28bad638c3ef5809cdee2127409971f18ff.tar.gz
Add open_basedir checks to readline_write_history and readline_read_history
-rw-r--r--ext/readline/readline.c8
1 files changed, 8 insertions, 0 deletions
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 {