diff options
| author | jvoisin | 2018-10-08 14:34:09 +0200 |
|---|---|---|
| committer | jvoisin | 2018-10-08 14:34:09 +0200 |
| commit | b9c388d1718947f748042586cf77d9b1ce00c61e (patch) | |
| tree | e19f489684b9177105f6ee89aa1514f580311bbd /src | |
| parent | 40b2ee2582fcf7d663bed562458ecac16f52b3e3 (diff) | |
Add a test
Diffstat (limited to 'src')
| -rw-r--r-- | src/tests/config/dump_request_nonwriteable_folder.ini | 1 | ||||
| -rw-r--r-- | src/tests/dump_request_nonwriteable_folder.phpt | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/tests/config/dump_request_nonwriteable_folder.ini b/src/tests/config/dump_request_nonwriteable_folder.ini new file mode 100644 index 0000000..91991bb --- /dev/null +++ b/src/tests/config/dump_request_nonwriteable_folder.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").drop().dump("/etc/"); | |||
diff --git a/src/tests/dump_request_nonwriteable_folder.phpt b/src/tests/dump_request_nonwriteable_folder.phpt new file mode 100644 index 0000000..84eb2f2 --- /dev/null +++ b/src/tests/dump_request_nonwriteable_folder.phpt | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | --TEST-- | ||
| 2 | Dump request - nonwriteable folder. | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php | ||
| 5 | if (!extension_loaded("snuffleupagus")) { print "skip"; } | ||
| 6 | ?> | ||
| 7 | --POST-- | ||
| 8 | post_a=data_post_a&post_b=data_post_b | ||
| 9 | --GET-- | ||
| 10 | get_a=data_get_a&get_b=data_get_b | ||
| 11 | --COOKIE-- | ||
| 12 | cookie_a=data_cookie_a&cookie_b=data_cookie_b | ||
| 13 | --INI-- | ||
| 14 | sp.configuration_file={PWD}/config/dump_request_nonwriteable_folder.ini | ||
| 15 | --FILE-- | ||
| 16 | <?php | ||
| 17 | echo "1\n"; | ||
| 18 | echo system("echo 1337;"); | ||
| 19 | echo "2\n"; | ||
| 20 | ?> | ||
| 21 | --EXPECTF-- | ||
| 22 | 1 | ||
| 23 | |||
| 24 | Warning: [snuffleupagus][request_logging] Unable to open %a: Permission denied in %a/tests/dump_request_nonwriteable_folder.php on line %d | ||
| 25 | |||
| 26 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'system' in %a/tests/dump_request_nonwriteable_folder.php on line 3 | ||
