Option to disable logging of dechunking

This commit is contained in:
Marc Stern 2017-05-02 11:09:10 -03:00 коммит произвёл Felipe Zimmerle
Родитель a4724dfdab
Коммит d7383c39dd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: E6DFB08CE8B11277
3 изменённых файлов: 24 добавлений и 1 удалений

Просмотреть файл

@ -1,6 +1,8 @@
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
[ModSecurity team]
* {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 */
/* ENH Only write this when the output was chunked. */
/* 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) {
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 */
/* ENH Only write this when the output was chunked. */
/* 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) {
text = apr_psprintf(msr->mp, "Response-Body-Transformed: Dechunked\n");
sec_auditlog_write(msr, text, strlen(text));

Просмотреть файл

@ -487,6 +487,21 @@ AC_ARG_ENABLE(handler-logging,
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
AC_ARG_ENABLE(errors,
AS_HELP_STRING([--disable-errors],
@ -737,7 +752,7 @@ else
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_EXTRA_CFLAGS=""