summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2012-03-21 09:13:42 -0700
committerRasmus Lerdorf <rasmus@php.net>2012-03-21 09:13:42 -0700
commit2208fb32564cf13578c4bb77c6792d5e6b767e76 (patch)
tree312c7bad0f7b6523c8a94f77ca1ea95483d87544 /ext
parent53e3467ff233af4a40626f86ea8a61880722beb8 (diff)
parent8b01a28bad638c3ef5809cdee2127409971f18ff (diff)
downloadphp-git-2208fb32564cf13578c4bb77c6792d5e6b767e76.tar.gz
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: Add open_basedir checks to readline_write_history and readline_read_history
Diffstat (limited to 'ext')
-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 c9389fc8eb..1054b0ea3b 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -384,6 +384,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;
@@ -404,6 +408,10 @@ PHP_FUNCTION(readline_write_history)
return;
}
+ if (php_check_open_basedir(arg TSRMLS_CC)) {
+ RETURN_FALSE;
+ }
+
if (write_history(arg)) {
RETURN_FALSE;
} else {