com php-src: Test that readline respects open_basedir: ex t/readline/tests/readline_read_history_open_basedir_ 001.phpt
ext/readline/tests/readline_write_histor y_open_basedir_001.phpt

From: Date: Thu, 24 Aug 2017 23:12:36 +0000
Subject: com php-src: Test that readline respects open_basedir: ex t/readline/tests/readline_read_history_open_basedir_ 001.phpt
ext/readline/tests/readline_write_histor y_open_basedir_001.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-99158@lists.php.net to get a copy of this message
Commit: 8fb5bac6530c7456f88985dc10c848b7ed919bfb Author: Ricardo Melo <rjsmelo@gmail.com> Fri, 25 Aug 2017 00:12:36 +0100 Parents: b1a8dcc001cdd44afc4529b01ac15a2c6400cbd6 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8fb5bac6530c7456f88985dc10c848b7ed919bfb Log: Test that readline respects open_basedir Changed paths: A ext/readline/tests/readline_read_history_open_basedir_001.phpt A ext/readline/tests/readline_write_history_open_basedir_001.phpt Diff: diff --git a/ext/readline/tests/readline_read_history_open_basedir_001.phpt b/ext/readline/tests/readline_read_history_open_basedir_001.phpt new file mode 100644 index 0000000..6b8ecce --- /dev/null +++ b/ext/readline/tests/readline_read_history_open_basedir_001..phpt @@ -0,0 +1,17 @@ +--TEST-- +readline_read_history(): Test that open_basedir is respected +--SKIPIF-- +<?php if (!extension_loaded("readline") || !function_exists('readline_read_history')) die("skip"); ?> +--INI-- +open_basedir=/tmp/some-sandbox +--FILE-- +<?php + +$name = '/tmp/out-of-sandbox'; + +var_dump(readline_read_history($name)); + +?> +--EXPECTF-- +Warning: readline_read_history(): open_basedir restriction in effect. File(/tmp/out-of-sandbox) is not within the allowed path(s): (/tmp/some-sandbox) in %s on line %d +bool(false) \ No newline at end of file diff --git a/ext/readline/tests/readline_write_history_open_basedir_001.phpt b/ext/readline/tests/readline_write_history_open_basedir_001.phpt new file mode 100644 index 0000000..bd7880b --- /dev/null +++ b/ext/readline/tests/readline_write_history_open_basedir_001.phpt @@ -0,0 +1,17 @@ +--TEST-- +readline_write_history(): Test that open_basedir is respected +--SKIPIF-- +<?php if (!extension_loaded("readline") || !function_exists('readline_write_history')) die("skip"); ?> +--INI-- +open_basedir=/tmp/some-sandbox +--FILE-- +<?php + +$name = '/tmp/out-of-sandbox'; + +var_dump(readline_write_history($name)); + +?> +--EXPECTF-- +Warning: readline_write_history(): open_basedir restriction in effect. File(/tmp/out-of-sandbox) is not within the allowed path(s): (/tmp/some-sandbox) in %s on line %d +bool(false) \ No newline at end of file

« previous php.cvs (#99158) next »