diff options
Diffstat (limited to 'tests/include/include_uploaded_file_diff_filename.phpt')
| -rw-r--r-- | tests/include/include_uploaded_file_diff_filename.phpt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/include/include_uploaded_file_diff_filename.phpt b/tests/include/include_uploaded_file_diff_filename.phpt new file mode 100644 index 0000000..8d3bca5 --- /dev/null +++ b/tests/include/include_uploaded_file_diff_filename.phpt | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | --TEST-- | ||
| 2 | Testing include file from $_FILES (but change name a bit) | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php include "../skipifcli.inc"; ?> | ||
| 5 | --INI-- | ||
| 6 | suhosin.log.syslog=0 | ||
| 7 | suhosin.log.sapi=0 | ||
| 8 | suhosin.log.stdout=255 | ||
| 9 | suhosin.log.script=0 | ||
| 10 | suhosin.log.phpscript=0 | ||
| 11 | suhosin.executor.include.whitelist= | ||
| 12 | suhosin.executor.include.blacklist= | ||
| 13 | --POST_RAW-- | ||
| 14 | Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 | ||
| 15 | -----------------------------20896060251896012921717172737 | ||
| 16 | Content-Disposition: form-data; name="f1"; filename="filename2" | ||
| 17 | |||
| 18 | <?php echo "NO_GOOD/n"; | ||
| 19 | -----------------------------20896060251896012921717172737-- | ||
| 20 | --FILE-- | ||
| 21 | <?php | ||
| 22 | include "/../../../" . $_FILES['f1']['tmp_name']; | ||
| 23 | ?> | ||
| 24 | --EXPECTF-- | ||
| 25 | ALERT - Include filename is an uploaded file (attacker 'REMOTE_ADDR not set', file '%s', line 2) \ No newline at end of file | ||
