Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd7383c3

Browse files
Marc SternFelipe Zimmerle
Marc Stern
authored and
Felipe Zimmerle
committed
Option to disable logging of dechunking
1 parenta4724df commitd7383c3

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

‎CHANGES‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
DD MMM YYYY - 2.9.2 - To be released
22
------------------------------------
33

4+
* {dis|en}able-dechunk-logging: Option to disable logging of
5+
dechunking in audit log when log level < 9.
46
* Updates libinjection to: da027ab52f9cf14401dd92e34e6683d183bdb3b4
57
[ModSecurity team]
68
* {dis|en}able-handler-logging: Option to disable logging of Apache handler

‎apache2/msc_logging.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,9 @@ void sec_audit_logger_json(modsec_rec *msr) {
11701170
/* Our response body does not contain chunks */
11711171
/* ENH Only write this when the output was chunked. */
11721172
/* ENH Add info when request body was decompressed, dechunked too. */
1173+
#ifdefLOG_NO_DECHUNK
1174+
if (msr->txcfg->debuglog_level >=9)
1175+
#endif
11731176
if (wrote_response_body) {
11741177
yajl_kv_bool(g,"response_body_dechunked",1);
11751178
}
@@ -2002,6 +2005,9 @@ void sec_audit_logger_native(modsec_rec *msr) {
20022005
/* Our response body does not contain chunks */
20032006
/* ENH Only write this when the output was chunked. */
20042007
/* ENH Add info when request body was decompressed, dechunked too. */
2008+
#ifdefLOG_NO_DECHUNK
2009+
if (msr->txcfg->debuglog_level >=9)
2010+
#endif
20052011
if (wrote_response_body) {
20062012
text=apr_psprintf(msr->mp,"Response-Body-Transformed: Dechunked\n");
20072013
sec_auditlog_write(msr,text,strlen(text));

‎configure.ac‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,21 @@ AC_ARG_ENABLE(handler-logging,
487487
log_handler=''
488488
])
489489

490+
# Disable logging of dechunking
491+
AC_ARG_ENABLE(dechunk-logging,
492+
AS_HELP_STRING([--enable-dechunk-logging],
493+
[Enable logging of dechunking in audit log when log level < 9. This is the default]),
494+
[
495+
if test "$enableval" != "no"; then
496+
log_dechunk=
497+
else
498+
log_dechunk="-DLOG_NO_DECHUNK"
499+
fi
500+
],
501+
[
502+
log_dechunk=''
503+
])
504+
490505
# Ignore configure errors
491506
AC_ARG_ENABLE(errors,
492507
AS_HELP_STRING([--disable-errors],
@@ -737,7 +752,7 @@ else
737752
fi
738753
fi
739754

740-
MODSEC_EXTRA_CFLAGS="$pcre_study $pcre_match_limit $pcre_match_limit_recursion $pcre_jit $request_early $htaccess_config $lua_cache $debug_conf $debug_cache $debug_acmp $debug_mem $perf_meas $modsec_api $cpu_type $unique_id $log_filename $log_server $log_collection_delete_problem"
755+
MODSEC_EXTRA_CFLAGS="$pcre_study $pcre_match_limit $pcre_match_limit_recursion $pcre_jit $request_early $htaccess_config $lua_cache $debug_conf $debug_cache $debug_acmp $debug_mem $perf_meas $modsec_api $cpu_type $unique_id $log_filename $log_server $log_collection_delete_problem $log_dechunk"
741756

742757
APXS_WRAPPER=build/apxs-wrapper
743758
APXS_EXTRA_CFLAGS=""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp