com php-src: Add open_basedir checks to readline_writ e_history and readline_read_history: ext/readline /readline.c
| From: | Stanislav Malyshev | Date: | Wed, 21 Mar 2012 16:13:06 +0000 |
| Subject: | com php-src: Add open_basedir checks to readline_writ e_history and readline_read_history: ext/readline /readline.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-68246@lists.php.net to get a copy of this message | ||
Commit: 8b01a28bad638c3ef5809cdee2127409971f18ff
Author: Rasmus Lerdorf <rasmus@php.net> Wed, 21 Mar 2012 09:13:06 -0700
Parents: 887ee455dc2059a3154ee1173e2b973932067743
Branches: PHP-5.4
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8b01a28bad638c3ef5809cdee2127409971f18ff
Log:
Add open_basedir checks to readline_write_history and readline_read_history
Changed paths:
M ext/readline/readline.c
Diff:
8b01a28bad638c3ef5809cdee2127409971f18ff
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index c514cb8..820e4b4 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 {