From def06bc8331efe49ad3a3768da7800f60459c390 Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Mon, 6 Oct 2014 17:35:09 +0200 Subject: suppress date/time logging with suhosin.log.file.time=0 --- log.c | 14 +++++++++----- php_suhosin.h | 1 + suhosin.c | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/log.c b/log.c index fbea503..1a4c783 100644 --- a/log.c +++ b/log.c @@ -261,10 +261,14 @@ log_file: return; } - gettimeofday(&tv, NULL); - now = tv.tv_sec; - php_localtime_r(&now, &tm); - ap_php_snprintf(error, sizeof(error), "%s %2d %02d:%02d:%02d [%u] %s\n", month_names[tm.tm_mon], tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, getpid(),buf); + if (SUHOSIN_G(log_file_time)) { + gettimeofday(&tv, NULL); + now = tv.tv_sec; + php_localtime_r(&now, &tm); + ap_php_snprintf(error, sizeof(error), "%s %2d %02d:%02d:%02d [%u] %s\n", month_names[tm.tm_mon], tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, getpid(),buf); + } else { + ap_php_snprintf(error, sizeof(error), "%s\n", buf); + } towrite = strlen(error); wbuf = error; php_flock(fd, LOCK_EX); @@ -290,7 +294,7 @@ log_sapi: #endif } if ((SUHOSIN_G(log_stdout) & loglevel)!=0) { - printf("%s\n", buf); + fprintf(stdout, "%s\n", buf); } /*log_script:*/ diff --git a/php_suhosin.h b/php_suhosin.h index d567877..fc6fef1 100644 --- a/php_suhosin.h +++ b/php_suhosin.h @@ -275,6 +275,7 @@ ZEND_BEGIN_MODULE_GLOBALS(suhosin) zend_bool log_phpscript_is_safe; long log_file; char *log_filename; + zend_bool log_file_time; /* header handler */ zend_bool allow_multiheader; diff --git a/suhosin.c b/suhosin.c index fc84a94..fa57ee1 100644 --- a/suhosin.c +++ b/suhosin.c @@ -750,6 +750,7 @@ static zend_ini_entry shared_ini_entries[] = { STD_ZEND_INI_ENTRY("suhosin.log.phpscript.name", NULL, ZEND_INI_PERDIR|ZEND_INI_SYSTEM, OnUpdateLogString, log_phpscriptname, zend_suhosin_globals, suhosin_globals) ZEND_INI_ENTRY("suhosin.log.file", "0", ZEND_INI_PERDIR|ZEND_INI_SYSTEM, OnUpdateSuhosin_log_file) STD_ZEND_INI_ENTRY("suhosin.log.file.name", NULL, ZEND_INI_PERDIR|ZEND_INI_SYSTEM, OnUpdateLogString, log_filename, zend_suhosin_globals, suhosin_globals) + STD_ZEND_INI_BOOLEAN("suhosin.log.file.time", "1", ZEND_INI_PERDIR|ZEND_INI_SYSTEM, OnUpdateLogBool, log_file_time, zend_suhosin_globals, suhosin_globals) STD_ZEND_INI_BOOLEAN("suhosin.log.phpscript.is_safe", "0", ZEND_INI_PERDIR|ZEND_INI_SYSTEM, OnUpdateLogBool, log_phpscript_is_safe, zend_suhosin_globals, suhosin_globals) ZEND_INI_END() -- cgit v1.3 From ff4edc6ecf463211c6527879d6b23f991fd5b73b Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Mon, 6 Oct 2014 17:36:23 +0200 Subject: restructured error output in unittests. (issues #52 + #54) --- .gitignore | 2 +- tests/executor/allow_symlink_off.phpt | 7 +++++-- tests/filter/filter_logging_statistics.phpt | 7 +++++-- tests/filter/get_filter_1.phpt | 7 +++++-- tests/filter/get_filter_2.phpt | 7 +++++-- tests/filter/get_filter_allow_ws.phpt | 2 +- tests/filter/get_filter_cookie_disallow_ws.phpt | 7 +++++-- tests/filter/get_filter_get_disallow_ws.phpt | 7 +++++-- tests/filter/get_filter_post_disallow_ws.phpt | 7 +++++-- tests/filter/get_filter_request_disallow_ws.phpt | 7 +++++-- tests/filter/input_filter_allow_nul.phpt | Bin 955 -> 958 bytes tests/filter/input_filter_cookie_disallow_nul.phpt | 7 +++++-- .../filter/input_filter_cookie_max_array_depth.phpt | 7 +++++-- .../input_filter_cookie_max_array_index_length.phpt | 7 +++++-- .../filter/input_filter_cookie_max_name_length.phpt | 7 +++++-- .../input_filter_cookie_max_totalname_length.phpt | 7 +++++-- .../input_filter_cookie_max_value_length.phpt | 7 +++++-- tests/filter/input_filter_cookie_max_vars.phpt | 5 ++++- tests/filter/input_filter_get_disallow_nul.phpt | 7 +++++-- tests/filter/input_filter_get_max_array_depth.phpt | 7 +++++-- .../input_filter_get_max_array_index_length.phpt | 7 +++++-- tests/filter/input_filter_get_max_name_length.phpt | 7 +++++-- .../input_filter_get_max_totalname_length.phpt | 7 +++++-- tests/filter/input_filter_get_max_value_length.phpt | 7 +++++-- tests/filter/input_filter_post_disallow_nul.phpt | 7 +++++-- .../input_filter_post_disallow_nul_rfc1867.phpt | Bin 1386 -> 1508 bytes tests/filter/input_filter_post_max_array_depth.phpt | 7 +++++-- .../input_filter_post_max_array_depth_rfc1867.phpt | 7 +++++-- .../input_filter_post_max_array_index_length.phpt | 7 +++++-- ..._filter_post_max_array_index_length_rfc1867.phpt | 7 +++++-- tests/filter/input_filter_post_max_name_length.phpt | 7 +++++-- .../input_filter_post_max_name_length_rfc1867.phpt | 7 +++++-- .../input_filter_post_max_totalname_length.phpt | 7 +++++-- ...ut_filter_post_max_totalname_length_rfc1867.phpt | 7 +++++-- .../filter/input_filter_post_max_value_length.phpt | 7 +++++-- .../input_filter_post_max_value_length_rfc1867.phpt | Bin 1790 -> 1912 bytes tests/filter/input_filter_request_disallow_nul.phpt | 7 +++++-- .../input_filter_request_max_array_depth.phpt | 7 +++++-- ...input_filter_request_max_array_index_length.phpt | 7 +++++-- .../input_filter_request_max_name_length.phpt | 7 +++++-- .../input_filter_request_max_totalname_length.phpt | 7 +++++-- .../input_filter_request_max_value_length.phpt | 7 +++++-- tests/filter/post_fileupload_filter_1.phpt | 7 +++++-- tests/filter/post_fileupload_filter_2.phpt | 7 +++++-- tests/filter/post_filter_1.phpt | 7 +++++-- tests/filter/post_filter_2.phpt | 7 +++++-- tests/filter/post_filter_empty_var.phpt | 2 +- tests/filter/server_encode_off.phpt | 2 +- tests/filter/server_encode_on.phpt | 2 +- tests/filter/server_filter.phpt | 7 +++++-- tests/filter/server_strip_off.phpt | 2 +- tests/filter/server_strip_on.phpt | 2 +- tests/filter/server_user_agent_strip_off.phpt | 2 +- tests/filter/server_user_agent_strip_on.phpt | 2 +- .../filter/suhosin_upload_disallow_binary_off.phpt | Bin 9471 -> 9474 bytes tests/filter/suhosin_upload_disallow_binary_on.phpt | Bin 12142 -> 12264 bytes .../filter/suhosin_upload_disallow_binary_utf8.phpt | 2 +- .../suhosin_upload_disallow_binary_utf8fail.phpt | 7 +++++-- tests/filter/suhosin_upload_disallow_elf.phpt | 7 +++++-- tests/filter/suhosin_upload_disallow_elf_off.phpt | 2 +- tests/filter/suhosin_upload_max_uploads.phpt | 7 +++++-- tests/filter/suhosin_upload_remove_binary.phpt | Bin 796 -> 799 bytes tests/filter/suhosin_upload_remove_binary_utf8.phpt | 2 +- .../suhosin_upload_remove_binary_utf8fail.phpt | 2 +- .../include_uploaded_file_diff_filename.phpt | 3 +-- tests/include/include_uploaded_file_from_FILES.phpt | 3 +-- tests/logging/use_x_forwarded_for_off.phpt | 12 ++++++++---- .../use_x_forwarded_for_off_no_remote_addr.phpt | 12 ++++++++---- tests/logging/use_x_forwarded_for_on.phpt | 12 ++++++++---- .../use_x_forwarded_for_on_no_x_forwarded.phpt | 12 ++++++++---- tests/sql/mysqli_comment_conditional.phpt | 2 +- tests/sql/mysqli_comment_cstyle_fail.phpt | 2 +- tests/sql/mysqli_comment_hashstyle_fail.phpt | 2 +- tests/sql/mysqli_comment_sqlstyle.phpt | 2 +- tests/sql/mysqli_comment_sqlstyle_fail.phpt | 2 +- tests/sql/mysqli_connect_invalid_username.phpt | 2 +- tests/sql/mysqli_multiselect.phpt | 2 +- tests/sql/mysqli_multiselect_fail.phpt | 2 +- tests/sql/mysqli_multiselect_subselect.phpt | 2 +- tests/sql/mysqli_no_constraints.phpt | 2 +- tests/sql/mysqli_open_comment.phpt | 2 +- tests/sql/mysqli_open_comment_fail.phpt | 2 +- tests/sql/mysqli_union.phpt | 2 +- tests/sql/mysqli_union_fail.phpt | 2 +- tests/sql/mysqli_user_match_error.phpt | 2 +- tests/sql/mysqli_user_match_ok.phpt | 2 +- tests/sql/mysqli_user_postfix.phpt | 2 +- tests/sql/mysqli_user_prefix.phpt | 2 +- tests/sql/skipifmysqli.inc | 3 +++ 89 files changed, 292 insertions(+), 140 deletions(-) diff --git a/.gitignore b/.gitignore index ddb1030..e243bfb 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,4 @@ /modules/ /run-tests.php /suhosin.la - +/tests/*/*.tmp diff --git a/tests/executor/allow_symlink_off.phpt b/tests/executor/allow_symlink_off.phpt index 782d818..8abdee8 100644 --- a/tests/executor/allow_symlink_off.phpt +++ b/tests/executor/allow_symlink_off.phpt @@ -5,10 +5,13 @@ suhosin.executor.allow_symlink=Off --INI-- error_reporting=E_ALL open_basedir= -suhosin.log.stdout=255 -suhosin.log.script=0 suhosin.log.syslog=0 suhosin.log.sapi=0 +suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.executor.allow_symlink=Off --FILE-- + --COOKIE-- --GET-- A=A&B=B&C=C&D=D&E=E&F=F&G=G& diff --git a/tests/filter/get_filter_1.phpt b/tests/filter/get_filter_1.phpt index 0ab079c..a4218be 100644 --- a/tests/filter/get_filter_1.phpt +++ b/tests/filter/get_filter_1.phpt @@ -3,10 +3,13 @@ suhosin GET filter (disallowed variable names) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp --SKIPIF-- - + --COOKIE-- --GET-- HTTP_RAW_POST_DATA=HTTP_RAW_POST_DATA&HTTP_SESSION_VARS=HTTP_SESSION_VARS&harmless1=harmless1&HTTP_SERVER_VARS=HTTP_SERVER_VARS&HTTP_COOKIE_VARS=HTTP_COOKIE_VARS&HTTP_POST_FILES=HTTP_POST_FILES&HTTP_POST_VARS=HTTP_POST_VARS&HTTP_GET_VARS=HTTP_GET_VARS&HTTP_ENV_VARS=HTTP_ENV_VARS&_SESSION=_SESSION&_REQUEST=_REQUEST&GLOBALS=GLOBALS&_COOKIE=_COOKIE&_SERVER=_SERVER&_FILES=_FILES&_POST=_POST&_ENV=_ENV&_GET=_GET&harmless2=harmless2& diff --git a/tests/filter/get_filter_2.phpt b/tests/filter/get_filter_2.phpt index 189ac28..5aa53d7 100644 --- a/tests/filter/get_filter_2.phpt +++ b/tests/filter/get_filter_2.phpt @@ -3,11 +3,14 @@ suhosin GET filter (suhosin.get.max_vars) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.get.max_vars=5 --SKIPIF-- - + --COOKIE-- --GET-- A=A&B=B&C=C&D=D&E=E&F=F&G=G& diff --git a/tests/filter/get_filter_allow_ws.phpt b/tests/filter/get_filter_allow_ws.phpt index 41b230e..2a0445c 100644 --- a/tests/filter/get_filter_allow_ws.phpt +++ b/tests/filter/get_filter_allow_ws.phpt @@ -10,7 +10,7 @@ suhosin.get.disallow_ws=0 suhosin.post.disallow_ws=0 suhosin.cookie.disallow_ws=0 --SKIPIF-- - + --COOKIE-- +var1=1;var2=2;%20var3=3; var4=4; --GET-- diff --git a/tests/filter/get_filter_cookie_disallow_ws.phpt b/tests/filter/get_filter_cookie_disallow_ws.phpt index 4da6716..3065b7d 100644 --- a/tests/filter/get_filter_cookie_disallow_ws.phpt +++ b/tests/filter/get_filter_cookie_disallow_ws.phpt @@ -3,11 +3,14 @@ suhosin input filter (suhosin.cookie.disallow_ws) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.cookie.disallow_ws=1 --SKIPIF-- - + --COOKIE-- +var1=1;var2=2;%20var3=3; var4=4; --GET-- diff --git a/tests/filter/get_filter_get_disallow_ws.phpt b/tests/filter/get_filter_get_disallow_ws.phpt index b92dd73..9495486 100644 --- a/tests/filter/get_filter_get_disallow_ws.phpt +++ b/tests/filter/get_filter_get_disallow_ws.phpt @@ -3,11 +3,14 @@ suhosin input filter (suhosin.get.disallow_ws) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.get.disallow_ws=1 --SKIPIF-- - + --COOKIE-- --GET-- +var1=1&var2=2&%20var3=3& var4=4& diff --git a/tests/filter/get_filter_post_disallow_ws.phpt b/tests/filter/get_filter_post_disallow_ws.phpt index 55c7cf1..003afa5 100644 --- a/tests/filter/get_filter_post_disallow_ws.phpt +++ b/tests/filter/get_filter_post_disallow_ws.phpt @@ -3,11 +3,14 @@ suhosin input filter (suhosin.post.disallow_ws) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.post.disallow_ws=1 --SKIPIF-- - + --COOKIE-- --GET-- --POST-- diff --git a/tests/filter/get_filter_request_disallow_ws.phpt b/tests/filter/get_filter_request_disallow_ws.phpt index fd22d62..fe69e78 100644 --- a/tests/filter/get_filter_request_disallow_ws.phpt +++ b/tests/filter/get_filter_request_disallow_ws.phpt @@ -3,11 +3,14 @@ suhosin input filter (suhosin.request.disallow_ws) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.disallow_ws=1 --SKIPIF-- - + --COOKIE-- --GET-- +var1=1&var2=2&%20var3=3& var4=4& diff --git a/tests/filter/input_filter_allow_nul.phpt b/tests/filter/input_filter_allow_nul.phpt index 478d4b4..a913189 100644 Binary files a/tests/filter/input_filter_allow_nul.phpt and b/tests/filter/input_filter_allow_nul.phpt differ diff --git a/tests/filter/input_filter_cookie_disallow_nul.phpt b/tests/filter/input_filter_cookie_disallow_nul.phpt index dab9241..ae05ac6 100644 --- a/tests/filter/input_filter_cookie_disallow_nul.phpt +++ b/tests/filter/input_filter_cookie_disallow_nul.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.cookie.disallow_nul) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.disallow_nul=0 suhosin.cookie.disallow_nul=1 --SKIPIF-- - + --COOKIE-- var1=xx%001;var2=2;var3=xx%003;var4=4; --GET-- diff --git a/tests/filter/input_filter_cookie_max_array_depth.phpt b/tests/filter/input_filter_cookie_max_array_depth.phpt index 10fc667..327fa36 100644 --- a/tests/filter/input_filter_cookie_max_array_depth.phpt +++ b/tests/filter/input_filter_cookie_max_array_depth.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.cookie.max_array_depth) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_array_depth=0 suhosin.cookie.max_array_depth=4 --SKIPIF-- - + --COOKIE-- var1[]=1;var2[][]=2;var3[][][]=3;var4[][][][]=4;var5[][][][][]=5;var6[][][][][][]=6; --GET-- diff --git a/tests/filter/input_filter_cookie_max_array_index_length.phpt b/tests/filter/input_filter_cookie_max_array_index_length.phpt index 76dcad4..b954e63 100644 --- a/tests/filter/input_filter_cookie_max_array_index_length.phpt +++ b/tests/filter/input_filter_cookie_max_array_index_length.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.cookie.max_array_index_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_array_index_length=0 suhosin.cookie.max_array_index_length=3 --SKIPIF-- - + --COOKIE-- var1[AAA]=1;var2[BBBB]=1;var3[AAA][BBB]=1;var4[AAA][BBBB]=4;var5[AAA][BBB][CCC]=1;var6[AAA][BBBB][CCC]=1; --GET-- diff --git a/tests/filter/input_filter_cookie_max_name_length.phpt b/tests/filter/input_filter_cookie_max_name_length.phpt index b655424..38b8558 100644 --- a/tests/filter/input_filter_cookie_max_name_length.phpt +++ b/tests/filter/input_filter_cookie_max_name_length.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.cookie.max_name_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_varname_length=0 suhosin.cookie.max_name_length=4 --SKIPIF-- - + --COOKIE-- var=0;var1=1;var2[]=2;var3[xxx]=3;var04=4;var05[]=5;var06[xxx]=6; --GET-- diff --git a/tests/filter/input_filter_cookie_max_totalname_length.phpt b/tests/filter/input_filter_cookie_max_totalname_length.phpt index b356dc6..b9324fc 100644 --- a/tests/filter/input_filter_cookie_max_totalname_length.phpt +++ b/tests/filter/input_filter_cookie_max_totalname_length.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.cookie.max_totalname_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_totalname_length=0 suhosin.cookie.max_totalname_length=7 --SKIPIF-- - + --COOKIE-- var=0;var1=1;var2[]=2;var3[xxx]=3;var04=4;var05[]=5;var06[xxx]=6; --GET-- diff --git a/tests/filter/input_filter_cookie_max_value_length.phpt b/tests/filter/input_filter_cookie_max_value_length.phpt index fb8b3d8..d691c9e 100644 --- a/tests/filter/input_filter_cookie_max_value_length.phpt +++ b/tests/filter/input_filter_cookie_max_value_length.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.cookie.max_value_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_value_length=0 suhosin.cookie.max_value_length=3 --SKIPIF-- - + --COOKIE-- var1=1;var2=22;var3=333;var4=4444;var5=55%00555;var6=666666; --GET-- diff --git a/tests/filter/input_filter_cookie_max_vars.phpt b/tests/filter/input_filter_cookie_max_vars.phpt index 9047df3..fed391e 100644 --- a/tests/filter/input_filter_cookie_max_vars.phpt +++ b/tests/filter/input_filter_cookie_max_vars.phpt @@ -5,8 +5,11 @@ suhosin input filter (suhosin.cookie.max_vars) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.cookie.max_vars=3 --COOKIE-- a=1; b=2; c=3; d=4 diff --git a/tests/filter/input_filter_get_disallow_nul.phpt b/tests/filter/input_filter_get_disallow_nul.phpt index b7c2ad4..5a5b506 100644 --- a/tests/filter/input_filter_get_disallow_nul.phpt +++ b/tests/filter/input_filter_get_disallow_nul.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.get.disallow_nul) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.disallow_nul=0 suhosin.get.disallow_nul=1 --SKIPIF-- - + --COOKIE-- --GET-- var1=xx%001&var2=2&var3=xx%003&var4=4& diff --git a/tests/filter/input_filter_get_max_array_depth.phpt b/tests/filter/input_filter_get_max_array_depth.phpt index 9a32f29..99fb666 100644 --- a/tests/filter/input_filter_get_max_array_depth.phpt +++ b/tests/filter/input_filter_get_max_array_depth.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.get.max_array_depth) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_array_depth=0 suhosin.get.max_array_depth=4 --SKIPIF-- - + --COOKIE-- --GET-- var1[]=1&var2[][]=2&var3[][][]=3&var4[][][][]=4&var5[][][][][]=5&var6[][][][][][]=6& diff --git a/tests/filter/input_filter_get_max_array_index_length.phpt b/tests/filter/input_filter_get_max_array_index_length.phpt index 890ec8e..54bf610 100644 --- a/tests/filter/input_filter_get_max_array_index_length.phpt +++ b/tests/filter/input_filter_get_max_array_index_length.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.get.max_array_index_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_array_index_length=0 suhosin.get.max_array_index_length=3 --SKIPIF-- - + --COOKIE-- --GET-- var1[AAA]=1&var2[BBBB]=1&var3[AAA][BBB]=1&var4[AAA][BBBB]=4&var5[AAA][BBB][CCC]=1&var6[AAA][BBBB][CCC]=1 diff --git a/tests/filter/input_filter_get_max_name_length.phpt b/tests/filter/input_filter_get_max_name_length.phpt index 4fab0a0..76ca5f6 100644 --- a/tests/filter/input_filter_get_max_name_length.phpt +++ b/tests/filter/input_filter_get_max_name_length.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.get.max_name_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_varname_length=0 suhosin.get.max_name_length=4 --SKIPIF-- - + --COOKIE-- --GET-- var=0&var1=1&var2[]=2&var3[xxx]=3&var04=4&var05[]=5&var06[xxx]=6& diff --git a/tests/filter/input_filter_get_max_totalname_length.phpt b/tests/filter/input_filter_get_max_totalname_length.phpt index 1353ee0..675708d 100644 --- a/tests/filter/input_filter_get_max_totalname_length.phpt +++ b/tests/filter/input_filter_get_max_totalname_length.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.get.max_totalname_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_totalname_length=0 suhosin.get.max_totalname_length=7 --SKIPIF-- - + --COOKIE-- --GET-- var=0&var1=1&var2[]=2&var3[xxx]=3&var04=4&var05[]=5&var06[xxx]=6& diff --git a/tests/filter/input_filter_get_max_value_length.phpt b/tests/filter/input_filter_get_max_value_length.phpt index a5eaf5b..3fa0cb7 100644 --- a/tests/filter/input_filter_get_max_value_length.phpt +++ b/tests/filter/input_filter_get_max_value_length.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.get.max_value_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_value_length=0 suhosin.get.max_value_length=3 --SKIPIF-- - + --COOKIE-- --GET-- var1=1&var2=22&var3=333&var4=4444&var5=55%00555&var6=666666& diff --git a/tests/filter/input_filter_post_disallow_nul.phpt b/tests/filter/input_filter_post_disallow_nul.phpt index 60c797e..99462b8 100644 --- a/tests/filter/input_filter_post_disallow_nul.phpt +++ b/tests/filter/input_filter_post_disallow_nul.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.post.disallow_nul) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.disallow_nul=0 suhosin.post.disallow_nul=1 --SKIPIF-- - + --COOKIE-- --GET-- --POST-- diff --git a/tests/filter/input_filter_post_disallow_nul_rfc1867.phpt b/tests/filter/input_filter_post_disallow_nul_rfc1867.phpt index ffd252e..21fba1f 100644 Binary files a/tests/filter/input_filter_post_disallow_nul_rfc1867.phpt and b/tests/filter/input_filter_post_disallow_nul_rfc1867.phpt differ diff --git a/tests/filter/input_filter_post_max_array_depth.phpt b/tests/filter/input_filter_post_max_array_depth.phpt index 97cd501..5bf8858 100644 --- a/tests/filter/input_filter_post_max_array_depth.phpt +++ b/tests/filter/input_filter_post_max_array_depth.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.post.max_array_depth) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_array_depth=0 suhosin.post.max_array_depth=4 --SKIPIF-- - + --COOKIE-- --GET-- --POST-- diff --git a/tests/filter/input_filter_post_max_array_depth_rfc1867.phpt b/tests/filter/input_filter_post_max_array_depth_rfc1867.phpt index e8fd566..b2eab71 100644 --- a/tests/filter/input_filter_post_max_array_depth_rfc1867.phpt +++ b/tests/filter/input_filter_post_max_array_depth_rfc1867.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.post.max_array_depth - RFC1867 version) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_array_depth=0 suhosin.post.max_array_depth=4 --SKIPIF-- - + --COOKIE-- --GET-- --POST_RAW-- diff --git a/tests/filter/input_filter_post_max_array_index_length.phpt b/tests/filter/input_filter_post_max_array_index_length.phpt index 2c5adef..285b30e 100644 --- a/tests/filter/input_filter_post_max_array_index_length.phpt +++ b/tests/filter/input_filter_post_max_array_index_length.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.post.max_array_index_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_array_index_length=0 suhosin.post.max_array_index_length=3 --SKIPIF-- - + --COOKIE-- --GET-- --POST-- diff --git a/tests/filter/input_filter_post_max_array_index_length_rfc1867.phpt b/tests/filter/input_filter_post_max_array_index_length_rfc1867.phpt index 58f0ed2..a3a19fa 100644 --- a/tests/filter/input_filter_post_max_array_index_length_rfc1867.phpt +++ b/tests/filter/input_filter_post_max_array_index_length_rfc1867.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.post.max_array_index_length - RFC1867 version) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_array_index_length=0 suhosin.post.max_array_index_length=3 --SKIPIF-- - + --COOKIE-- --GET-- --POST-- diff --git a/tests/filter/input_filter_post_max_name_length.phpt b/tests/filter/input_filter_post_max_name_length.phpt index 0065993..cf7b35d 100644 --- a/tests/filter/input_filter_post_max_name_length.phpt +++ b/tests/filter/input_filter_post_max_name_length.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.post.max_name_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_varname_length=0 suhosin.post.max_name_length=4 --SKIPIF-- - + --COOKIE-- --GET-- --POST-- diff --git a/tests/filter/input_filter_post_max_name_length_rfc1867.phpt b/tests/filter/input_filter_post_max_name_length_rfc1867.phpt index 45936d5..4ad072c 100644 --- a/tests/filter/input_filter_post_max_name_length_rfc1867.phpt +++ b/tests/filter/input_filter_post_max_name_length_rfc1867.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.post.max_name_length - RFC1867 version) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_varname_length=0 suhosin.post.max_name_length=4 --SKIPIF-- - + --COOKIE-- --GET-- --POST_RAW-- diff --git a/tests/filter/input_filter_post_max_totalname_length.phpt b/tests/filter/input_filter_post_max_totalname_length.phpt index b922302..1fef2bb 100644 --- a/tests/filter/input_filter_post_max_totalname_length.phpt +++ b/tests/filter/input_filter_post_max_totalname_length.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.post.max_totalname_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_totalname_length=0 suhosin.post.max_totalname_length=7 --SKIPIF-- - + --COOKIE-- --GET-- --POST-- diff --git a/tests/filter/input_filter_post_max_totalname_length_rfc1867.phpt b/tests/filter/input_filter_post_max_totalname_length_rfc1867.phpt index bbbcca4..f8fa6db 100644 --- a/tests/filter/input_filter_post_max_totalname_length_rfc1867.phpt +++ b/tests/filter/input_filter_post_max_totalname_length_rfc1867.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.post.max_totalname_length - RFC1867 version) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_totalname_length=0 suhosin.post.max_totalname_length=7 --SKIPIF-- - + --COOKIE-- --GET-- --POST_RAW-- diff --git a/tests/filter/input_filter_post_max_value_length.phpt b/tests/filter/input_filter_post_max_value_length.phpt index b560bde..7c5493f 100644 --- a/tests/filter/input_filter_post_max_value_length.phpt +++ b/tests/filter/input_filter_post_max_value_length.phpt @@ -3,12 +3,15 @@ suhosin input filter (suhosin.post.max_value_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_value_length=0 suhosin.post.max_value_length=3 --SKIPIF-- - + --COOKIE-- --GET-- --POST-- diff --git a/tests/filter/input_filter_post_max_value_length_rfc1867.phpt b/tests/filter/input_filter_post_max_value_length_rfc1867.phpt index 7552255..a788dfd 100644 Binary files a/tests/filter/input_filter_post_max_value_length_rfc1867.phpt and b/tests/filter/input_filter_post_max_value_length_rfc1867.phpt differ diff --git a/tests/filter/input_filter_request_disallow_nul.phpt b/tests/filter/input_filter_request_disallow_nul.phpt index 09903ec..0e9636f 100644 --- a/tests/filter/input_filter_request_disallow_nul.phpt +++ b/tests/filter/input_filter_request_disallow_nul.phpt @@ -3,11 +3,14 @@ suhosin input filter (suhosin.request.disallow_nul) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.disallow_nul=1 --SKIPIF-- - + --COOKIE-- var1=xx%001;var2=2;var3=xx%003;var4=4; --GET-- diff --git a/tests/filter/input_filter_request_max_array_depth.phpt b/tests/filter/input_filter_request_max_array_depth.phpt index ca67a39..0f10afe 100644 --- a/tests/filter/input_filter_request_max_array_depth.phpt +++ b/tests/filter/input_filter_request_max_array_depth.phpt @@ -3,11 +3,14 @@ suhosin input filter (suhosin.request.max_array_depth) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_array_depth=4 --SKIPIF-- - + --COOKIE-- var1[]=1;var2[][]=2;var3[][][]=3;var4[][][][]=4;var5[][][][][]=5;var6[][][][][][]=6; --GET-- diff --git a/tests/filter/input_filter_request_max_array_index_length.phpt b/tests/filter/input_filter_request_max_array_index_length.phpt index bb4c2ef..84b3849 100644 --- a/tests/filter/input_filter_request_max_array_index_length.phpt +++ b/tests/filter/input_filter_request_max_array_index_length.phpt @@ -3,11 +3,14 @@ suhosin input filter (suhosin.request.max_array_index_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_array_index_length=3 --SKIPIF-- - + --COOKIE-- var1[AAA]=1;var2[BBBB]=1;var3[AAA][BBB]=1;var4[AAA][BBBB]=4;var5[AAA][BBB][CCC]=1;var6[AAA][BBBB][CCC]=1; --GET-- diff --git a/tests/filter/input_filter_request_max_name_length.phpt b/tests/filter/input_filter_request_max_name_length.phpt index 03b4a3b..e231447 100644 --- a/tests/filter/input_filter_request_max_name_length.phpt +++ b/tests/filter/input_filter_request_max_name_length.phpt @@ -3,11 +3,14 @@ suhosin input filter (suhosin.request.max_varname_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_varname_length=4 --SKIPIF-- - + --COOKIE-- var=0;var1=1;var2[]=2;var3[xxx]=3;var04=4;var05[]=5;var06[xxx]=6; --GET-- diff --git a/tests/filter/input_filter_request_max_totalname_length.phpt b/tests/filter/input_filter_request_max_totalname_length.phpt index f028db1..e4ddd5b 100644 --- a/tests/filter/input_filter_request_max_totalname_length.phpt +++ b/tests/filter/input_filter_request_max_totalname_length.phpt @@ -3,11 +3,14 @@ suhosin input filter (suhosin.request.max_totalname_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_totalname_length=7 --SKIPIF-- - + --COOKIE-- var=0;var1=1;var2[]=2;var3[xxx]=3;var04=4;var05[]=5;var06[xxx]=6; --GET-- diff --git a/tests/filter/input_filter_request_max_value_length.phpt b/tests/filter/input_filter_request_max_value_length.phpt index 6906fb0..7617ff2 100644 --- a/tests/filter/input_filter_request_max_value_length.phpt +++ b/tests/filter/input_filter_request_max_value_length.phpt @@ -3,11 +3,14 @@ suhosin input filter (suhosin.request.max_value_length) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.request.max_value_length=3 --SKIPIF-- - + --COOKIE-- var1=1;var2=22;var3=333;var4=4444;var5=55%00555;var6=666666; --GET-- diff --git a/tests/filter/post_fileupload_filter_1.phpt b/tests/filter/post_fileupload_filter_1.phpt index 453c38d..4cb67fd 100644 --- a/tests/filter/post_fileupload_filter_1.phpt +++ b/tests/filter/post_fileupload_filter_1.phpt @@ -3,12 +3,15 @@ suhosin rfc1867 file upload filter (disallowed variable names) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp file_uploads=1 upload_max_filesize=1024 --SKIPIF-- - + --COOKIE-- --GET-- --POST_RAW-- diff --git a/tests/filter/post_fileupload_filter_2.phpt b/tests/filter/post_fileupload_filter_2.phpt index 48c63dc..51064f2 100644 --- a/tests/filter/post_fileupload_filter_2.phpt +++ b/tests/filter/post_fileupload_filter_2.phpt @@ -3,13 +3,16 @@ suhosin rfc1867 file upload filter (suhosin.post.max_vars) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.post.max_vars=5 file_uploads=1 upload_max_filesize=1024 --SKIPIF-- - + --COOKIE-- --GET-- --POST_RAW-- diff --git a/tests/filter/post_filter_1.phpt b/tests/filter/post_filter_1.phpt index eee353d..61eee24 100644 --- a/tests/filter/post_filter_1.phpt +++ b/tests/filter/post_filter_1.phpt @@ -3,10 +3,13 @@ suhosin POST filter (disallowed variable names) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp --SKIPIF-- - + --COOKIE-- --GET-- --POST-- diff --git a/tests/filter/post_filter_2.phpt b/tests/filter/post_filter_2.phpt index 22e773a..b64ffd0 100644 --- a/tests/filter/post_filter_2.phpt +++ b/tests/filter/post_filter_2.phpt @@ -3,11 +3,14 @@ suhosin POST filter (suhosin.post.max_vars) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.post.max_vars=5 --SKIPIF-- - + --COOKIE-- --GET-- --POST-- diff --git a/tests/filter/post_filter_empty_var.phpt b/tests/filter/post_filter_empty_var.phpt index f1eef0c..87866e2 100644 --- a/tests/filter/post_filter_empty_var.phpt +++ b/tests/filter/post_filter_empty_var.phpt @@ -6,7 +6,7 @@ suhosin.log.sapi=0 suhosin.log.stdout=255 suhosin.log.script=0 --SKIPIF-- - + --COOKIE-- --GET-- --POST-- diff --git a/tests/filter/server_encode_off.phpt b/tests/filter/server_encode_off.phpt index 8daccea..69793fd 100644 --- a/tests/filter/server_encode_off.phpt +++ b/tests/filter/server_encode_off.phpt @@ -9,7 +9,7 @@ suhosin.log.stdout=255 suhosin.log.script=0 suhosin.server.encode=Off --SKIPIF-- - + --ENV-- return <<"'`!AAA diff --git a/tests/filter/server_encode_on.phpt b/tests/filter/server_encode_on.phpt index 4cd7a66..3b02ce4 100644 --- a/tests/filter/server_encode_on.phpt +++ b/tests/filter/server_encode_on.phpt @@ -9,7 +9,7 @@ suhosin.log.stdout=255 suhosin.log.script=0 suhosin.server.encode=On --SKIPIF-- - + --ENV-- return <<"'`!AAA diff --git a/tests/filter/server_filter.phpt b/tests/filter/server_filter.phpt index b1271bd..f2afdf7 100644 --- a/tests/filter/server_filter.phpt +++ b/tests/filter/server_filter.phpt @@ -3,10 +3,13 @@ suhosin SERVER filter --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp --SKIPIF-- - + --ENV-- return << + --ENV-- return <<"'`!AAA diff --git a/tests/filter/server_strip_on.phpt b/tests/filter/server_strip_on.phpt index c595e95..9e9d991 100644 --- a/tests/filter/server_strip_on.phpt +++ b/tests/filter/server_strip_on.phpt @@ -9,7 +9,7 @@ suhosin.log.stdout=255 suhosin.log.script=0 suhosin.server.strip=On --SKIPIF-- - + --ENV-- return <<"'`!AAA diff --git a/tests/filter/server_user_agent_strip_off.phpt b/tests/filter/server_user_agent_strip_off.phpt index 36c6580..1f58007 100644 --- a/tests/filter/server_user_agent_strip_off.phpt +++ b/tests/filter/server_user_agent_strip_off.phpt @@ -9,7 +9,7 @@ suhosin.log.stdout=255 suhosin.log.script=0 suhosin.server.strip=Off --SKIPIF-- - + --ENV-- return <<alert('123');Gecko/20100101 Firefox/29.0 diff --git a/tests/filter/server_user_agent_strip_on.phpt b/tests/filter/server_user_agent_strip_on.phpt index 73d577c..df1d040 100644 --- a/tests/filter/server_user_agent_strip_on.phpt +++ b/tests/filter/server_user_agent_strip_on.phpt @@ -9,7 +9,7 @@ suhosin.log.stdout=255 suhosin.log.script=0 suhosin.server.strip=On --SKIPIF-- - + --ENV-- return <<alert('123');Gecko/20100101 Firefox/29.0 diff --git a/tests/filter/suhosin_upload_disallow_binary_off.phpt b/tests/filter/suhosin_upload_disallow_binary_off.phpt index cde9ea7..bcb76be 100644 Binary files a/tests/filter/suhosin_upload_disallow_binary_off.phpt and b/tests/filter/suhosin_upload_disallow_binary_off.phpt differ diff --git a/tests/filter/suhosin_upload_disallow_binary_on.phpt b/tests/filter/suhosin_upload_disallow_binary_on.phpt index 1e3444e..bc2c7ea 100644 Binary files a/tests/filter/suhosin_upload_disallow_binary_on.phpt and b/tests/filter/suhosin_upload_disallow_binary_on.phpt differ diff --git a/tests/filter/suhosin_upload_disallow_binary_utf8.phpt b/tests/filter/suhosin_upload_disallow_binary_utf8.phpt index 557a8d5..c4f1bcc 100644 --- a/tests/filter/suhosin_upload_disallow_binary_utf8.phpt +++ b/tests/filter/suhosin_upload_disallow_binary_utf8.phpt @@ -11,7 +11,7 @@ suhosin.upload.allow_utf8=On max_file_uploads=40 suhosin.upload.max_uploads=40 --SKIPIF-- - + --COOKIE-- --GET-- --POST_RAW-- diff --git a/tests/filter/suhosin_upload_disallow_binary_utf8fail.phpt b/tests/filter/suhosin_upload_disallow_binary_utf8fail.phpt index 413d25a..1d7279d 100644 --- a/tests/filter/suhosin_upload_disallow_binary_utf8fail.phpt +++ b/tests/filter/suhosin_upload_disallow_binary_utf8fail.phpt @@ -3,15 +3,18 @@ Testing: suhosin.upload.disallow_binary=On with UTF-8 and allow_utf8=Off --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp file_uploads=1 suhosin.upload.disallow_binary=On suhosin.upload.allow_utf8=Off max_file_uploads=40 suhosin.upload.max_uploads=40 --SKIPIF-- - + --COOKIE-- --GET-- --POST_RAW-- diff --git a/tests/filter/suhosin_upload_disallow_elf.phpt b/tests/filter/suhosin_upload_disallow_elf.phpt index 4ad2071..7b074f7 100644 --- a/tests/filter/suhosin_upload_disallow_elf.phpt +++ b/tests/filter/suhosin_upload_disallow_elf.phpt @@ -3,12 +3,15 @@ Testing: suhosin.upload.disallow_elf=On --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp file_uploads=1 suhosin.upload.disallow_elf=On --SKIPIF-- - + --COOKIE-- --GET-- --POST_RAW-- diff --git a/tests/filter/suhosin_upload_disallow_elf_off.phpt b/tests/filter/suhosin_upload_disallow_elf_off.phpt index 8be8301..832692c 100644 --- a/tests/filter/suhosin_upload_disallow_elf_off.phpt +++ b/tests/filter/suhosin_upload_disallow_elf_off.phpt @@ -8,7 +8,7 @@ suhosin.log.script=0 file_uploads=1 suhosin.upload.disallow_elf=Off --SKIPIF-- - + --COOKIE-- --GET-- --POST_RAW-- diff --git a/tests/filter/suhosin_upload_max_uploads.phpt b/tests/filter/suhosin_upload_max_uploads.phpt index 2e984bc..fb6f249 100644 --- a/tests/filter/suhosin_upload_max_uploads.phpt +++ b/tests/filter/suhosin_upload_max_uploads.phpt @@ -3,13 +3,16 @@ suhosin.upload.max_uploads --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.post.max_vars=5 file_uploads=1 suhosin.upload.max_uploads=3 --SKIPIF-- - + --COOKIE-- --GET-- --POST_RAW-- diff --git a/tests/filter/suhosin_upload_remove_binary.phpt b/tests/filter/suhosin_upload_remove_binary.phpt index f4337d9..8d158c3 100644 Binary files a/tests/filter/suhosin_upload_remove_binary.phpt and b/tests/filter/suhosin_upload_remove_binary.phpt differ diff --git a/tests/filter/suhosin_upload_remove_binary_utf8.phpt b/tests/filter/suhosin_upload_remove_binary_utf8.phpt index 6fbd240..0a8e097 100644 --- a/tests/filter/suhosin_upload_remove_binary_utf8.phpt +++ b/tests/filter/suhosin_upload_remove_binary_utf8.phpt @@ -12,7 +12,7 @@ suhosin.upload.allow_utf8=On max_file_uploads=40 suhosin.upload.max_uploads=40 --SKIPIF-- - + --COOKIE-- --GET-- --POST_RAW-- diff --git a/tests/filter/suhosin_upload_remove_binary_utf8fail.phpt b/tests/filter/suhosin_upload_remove_binary_utf8fail.phpt index 5c31115..4c9fcbc 100644 --- a/tests/filter/suhosin_upload_remove_binary_utf8fail.phpt +++ b/tests/filter/suhosin_upload_remove_binary_utf8fail.phpt @@ -12,7 +12,7 @@ suhosin.upload.allow_utf8=Off max_file_uploads=40 suhosin.upload.max_uploads=40 --SKIPIF-- - + --COOKIE-- --GET-- --POST_RAW-- diff --git a/tests/include/include_uploaded_file_diff_filename.phpt b/tests/include/include_uploaded_file_diff_filename.phpt index 8d3bca5..2c28340 100644 --- a/tests/include/include_uploaded_file_diff_filename.phpt +++ b/tests/include/include_uploaded_file_diff_filename.phpt @@ -5,9 +5,8 @@ Testing include file from $_FILES (but change name a bit) --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 -suhosin.log.phpscript=0 +suhosin.log.stdout=255 suhosin.executor.include.whitelist= suhosin.executor.include.blacklist= --POST_RAW-- diff --git a/tests/include/include_uploaded_file_from_FILES.phpt b/tests/include/include_uploaded_file_from_FILES.phpt index 1ec20f3..2c782b4 100644 --- a/tests/include/include_uploaded_file_from_FILES.phpt +++ b/tests/include/include_uploaded_file_from_FILES.phpt @@ -5,9 +5,8 @@ Testing include file from $_FILES --INI-- suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 -suhosin.log.phpscript=0 +suhosin.log.stdout=255 suhosin.executor.include.whitelist= suhosin.executor.include.blacklist= --POST_RAW-- diff --git a/tests/logging/use_x_forwarded_for_off.phpt b/tests/logging/use_x_forwarded_for_off.phpt index 6b31d53..2820523 100644 --- a/tests/logging/use_x_forwarded_for_off.phpt +++ b/tests/logging/use_x_forwarded_for_off.phpt @@ -3,12 +3,16 @@ Testing: suhosin.log.use-x-forwarded-for=Off --SKIPIF-- --INI-- +suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 -suhosin.log.syslog=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.executor.func.blacklist=max suhosin.log.use-x-forwarded-for=Off +suhosin.simulation=1 --ENV-- return << --EXPECTF-- -Warning: max() has been disabled for security reasons in %s on line 2 -ALERT - function within blacklist called: max() (attacker '101.102.103.104', file '%s', line 2) \ No newline at end of file +Warning: SIMULATION - max() has been disabled for security reasons in %s on line 2 +ALERT-SIMULATION - function within blacklist called: max() (attacker '101.102.103.104', file '%s', line 2) \ No newline at end of file diff --git a/tests/logging/use_x_forwarded_for_off_no_remote_addr.phpt b/tests/logging/use_x_forwarded_for_off_no_remote_addr.phpt index bd4c72b..1a30e81 100644 --- a/tests/logging/use_x_forwarded_for_off_no_remote_addr.phpt +++ b/tests/logging/use_x_forwarded_for_off_no_remote_addr.phpt @@ -3,16 +3,20 @@ Testing: suhosin.log.use-x-forwarded-for=Off (without REMOTE_ADDR set) --SKIPIF-- --INI-- +suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 -suhosin.log.syslog=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.executor.func.blacklist=max suhosin.log.use-x-forwarded-for=Off +suhosin.simulation=1 --FILE-- --EXPECTF-- -Warning: max() has been disabled for security reasons in %s on line 2 -ALERT - function within blacklist called: max() (attacker 'REMOTE_ADDR not set', file '%s', line 2) \ No newline at end of file +Warning: SIMULATION - max() has been disabled for security reasons in %s on line 2 +ALERT-SIMULATION - function within blacklist called: max() (attacker 'REMOTE_ADDR not set', file '%s', line 2) \ No newline at end of file diff --git a/tests/logging/use_x_forwarded_for_on.phpt b/tests/logging/use_x_forwarded_for_on.phpt index 5f37ca9..e476ba7 100644 --- a/tests/logging/use_x_forwarded_for_on.phpt +++ b/tests/logging/use_x_forwarded_for_on.phpt @@ -3,12 +3,16 @@ Testing: suhosin.log.use-x-forwarded-for=On --SKIPIF-- --INI-- +suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 -suhosin.log.syslog=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.executor.func.blacklist=max suhosin.log.use-x-forwarded-for=On +suhosin.simulation=1 --ENV-- return << --EXPECTF-- -Warning: max() has been disabled for security reasons in %s on line 2 -ALERT - function within blacklist called: max() (attacker '1.2.3.4', file '%s', line 2) \ No newline at end of file +Warning: SIMULATION - max() has been disabled for security reasons in %s on line 2 +ALERT-SIMULATION - function within blacklist called: max() (attacker '1.2.3.4', file '%s', line 2) \ No newline at end of file diff --git a/tests/logging/use_x_forwarded_for_on_no_x_forwarded.phpt b/tests/logging/use_x_forwarded_for_on_no_x_forwarded.phpt index aea6e06..b3e26de 100644 --- a/tests/logging/use_x_forwarded_for_on_no_x_forwarded.phpt +++ b/tests/logging/use_x_forwarded_for_on_no_x_forwarded.phpt @@ -3,16 +3,20 @@ Testing: suhosin.log.use-x-forwarded-for=On (without X-Forwarded-For set) --SKIPIF-- --INI-- +suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 -suhosin.log.syslog=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.executor.func.blacklist=max suhosin.log.use-x-forwarded-for=On +suhosin.simulation=1 --FILE-- --EXPECTF-- -Warning: max() has been disabled for security reasons in %s on line 2 -ALERT - function within blacklist called: max() (attacker 'X-FORWARDED-FOR not set', file '%s', line 2) \ No newline at end of file +Warning: SIMULATION - max() has been disabled for security reasons in %s on line 2 +ALERT-SIMULATION - function within blacklist called: max() (attacker 'X-FORWARDED-FOR not set', file '%s', line 2) \ No newline at end of file diff --git a/tests/sql/mysqli_comment_conditional.phpt b/tests/sql/mysqli_comment_conditional.phpt index 0436c64..02366c0 100644 --- a/tests/sql/mysqli_comment_conditional.phpt +++ b/tests/sql/mysqli_comment_conditional.phpt @@ -11,7 +11,7 @@ suhosin.log.stdout=32 --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- \ No newline at end of file -- cgit v1.3