mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Option to disable logging of dechunking
This commit is contained in:
committed by
Felipe Zimmerle
parent
a4724dfdab
commit
d7383c39dd
2
CHANGES
2
CHANGES
@@ -1,6 +1,8 @@
|
|||||||
DD MMM YYYY - 2.9.2 - To be released
|
DD MMM YYYY - 2.9.2 - To be released
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
|
||||||
|
* {dis|en}able-dechunk-logging: Option to disable logging of
|
||||||
|
dechunking in audit log when log level < 9.
|
||||||
* Updates libinjection to: da027ab52f9cf14401dd92e34e6683d183bdb3b4
|
* Updates libinjection to: da027ab52f9cf14401dd92e34e6683d183bdb3b4
|
||||||
[ModSecurity team]
|
[ModSecurity team]
|
||||||
* {dis|en}able-handler-logging: Option to disable logging of Apache handler
|
* {dis|en}able-handler-logging: Option to disable logging of Apache handler
|
||||||
|
@@ -1170,6 +1170,9 @@ void sec_audit_logger_json(modsec_rec *msr) {
|
|||||||
/* Our response body does not contain chunks */
|
/* Our response body does not contain chunks */
|
||||||
/* ENH Only write this when the output was chunked. */
|
/* ENH Only write this when the output was chunked. */
|
||||||
/* ENH Add info when request body was decompressed, dechunked too. */
|
/* ENH Add info when request body was decompressed, dechunked too. */
|
||||||
|
#ifdef LOG_NO_DECHUNK
|
||||||
|
if (msr->txcfg->debuglog_level >= 9)
|
||||||
|
#endif
|
||||||
if (wrote_response_body) {
|
if (wrote_response_body) {
|
||||||
yajl_kv_bool(g, "response_body_dechunked", 1);
|
yajl_kv_bool(g, "response_body_dechunked", 1);
|
||||||
}
|
}
|
||||||
@@ -2002,6 +2005,9 @@ void sec_audit_logger_native(modsec_rec *msr) {
|
|||||||
/* Our response body does not contain chunks */
|
/* Our response body does not contain chunks */
|
||||||
/* ENH Only write this when the output was chunked. */
|
/* ENH Only write this when the output was chunked. */
|
||||||
/* ENH Add info when request body was decompressed, dechunked too. */
|
/* ENH Add info when request body was decompressed, dechunked too. */
|
||||||
|
#ifdef LOG_NO_DECHUNK
|
||||||
|
if (msr->txcfg->debuglog_level >= 9)
|
||||||
|
#endif
|
||||||
if (wrote_response_body) {
|
if (wrote_response_body) {
|
||||||
text = apr_psprintf(msr->mp, "Response-Body-Transformed: Dechunked\n");
|
text = apr_psprintf(msr->mp, "Response-Body-Transformed: Dechunked\n");
|
||||||
sec_auditlog_write(msr, text, strlen(text));
|
sec_auditlog_write(msr, text, strlen(text));
|
||||||
|
17
configure.ac
17
configure.ac
@@ -487,6 +487,21 @@ AC_ARG_ENABLE(handler-logging,
|
|||||||
log_handler=''
|
log_handler=''
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# Disable logging of dechunking
|
||||||
|
AC_ARG_ENABLE(dechunk-logging,
|
||||||
|
AS_HELP_STRING([--enable-dechunk-logging],
|
||||||
|
[Enable logging of dechunking in audit log when log level < 9. This is the default]),
|
||||||
|
[
|
||||||
|
if test "$enableval" != "no"; then
|
||||||
|
log_dechunk=
|
||||||
|
else
|
||||||
|
log_dechunk="-DLOG_NO_DECHUNK"
|
||||||
|
fi
|
||||||
|
],
|
||||||
|
[
|
||||||
|
log_dechunk=''
|
||||||
|
])
|
||||||
|
|
||||||
# Ignore configure errors
|
# Ignore configure errors
|
||||||
AC_ARG_ENABLE(errors,
|
AC_ARG_ENABLE(errors,
|
||||||
AS_HELP_STRING([--disable-errors],
|
AS_HELP_STRING([--disable-errors],
|
||||||
@@ -737,7 +752,7 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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"
|
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"
|
||||||
|
|
||||||
APXS_WRAPPER=build/apxs-wrapper
|
APXS_WRAPPER=build/apxs-wrapper
|
||||||
APXS_EXTRA_CFLAGS=""
|
APXS_EXTRA_CFLAGS=""
|
||||||
|
Reference in New Issue
Block a user