mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Option to disable logging of "Server" in audit log when log level < 9. [Issue #1070 - Marc Stern]
This commit is contained in:
committed by
Felipe Zimmerle
parent
c1c91e24cd
commit
9244cd9824
3
CHANGES
3
CHANGES
@@ -1,6 +1,9 @@
|
|||||||
DD MMM YYYY - 2.9.2 - To be released
|
DD MMM YYYY - 2.9.2 - To be released
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
|
||||||
|
* {dis|en}able-server-logging: Option to disable logging of
|
||||||
|
"Server" in audit log when log level < 9.
|
||||||
|
[Issue #1070 - Marc Stern]
|
||||||
* {dis|en}able-filename-logging: Option to disable logging of filename
|
* {dis|en}able-filename-logging: Option to disable logging of filename
|
||||||
in audit log.
|
in audit log.
|
||||||
[Issue #1065 - Marc Stern]
|
[Issue #1065 - Marc Stern]
|
||||||
|
@@ -2004,6 +2004,9 @@ void sec_audit_logger_native(modsec_rec *msr) {
|
|||||||
sec_auditlog_write_producer_header(msr);
|
sec_auditlog_write_producer_header(msr);
|
||||||
|
|
||||||
/* Server */
|
/* Server */
|
||||||
|
#ifdef LOG_NO_SERVER
|
||||||
|
if (msr->txcfg->debuglog_level >= 9)
|
||||||
|
#endif
|
||||||
if (msr->server_software != NULL) {
|
if (msr->server_software != NULL) {
|
||||||
text = apr_psprintf(msr->mp, "Server: %s\n", msr->server_software);
|
text = apr_psprintf(msr->mp, "Server: %s\n", msr->server_software);
|
||||||
sec_auditlog_write(msr, text, strlen(text));
|
sec_auditlog_write(msr, text, strlen(text));
|
||||||
|
17
configure.ac
17
configure.ac
@@ -442,6 +442,21 @@ AC_ARG_ENABLE(filename-logging,
|
|||||||
log_filename=''
|
log_filename=''
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# Disable logging of "Server"
|
||||||
|
AC_ARG_ENABLE(server-logging,
|
||||||
|
AS_HELP_STRING([--enable-server-logging],
|
||||||
|
[Enable logging of "Server" in audit log when log level < 9. This is the default]),
|
||||||
|
[
|
||||||
|
if test "$enableval" != "no"; then
|
||||||
|
log_server=
|
||||||
|
else
|
||||||
|
log_server="-DLOG_NO_SERVER"
|
||||||
|
fi
|
||||||
|
],
|
||||||
|
[
|
||||||
|
log_server=''
|
||||||
|
])
|
||||||
|
|
||||||
# Ignore configure errors
|
# Ignore configure errors
|
||||||
AC_ARG_ENABLE(errors,
|
AC_ARG_ENABLE(errors,
|
||||||
AS_HELP_STRING([--disable-errors],
|
AS_HELP_STRING([--disable-errors],
|
||||||
@@ -692,7 +707,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"
|
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"
|
||||||
|
|
||||||
APXS_WRAPPER=build/apxs-wrapper
|
APXS_WRAPPER=build/apxs-wrapper
|
||||||
APXS_EXTRA_CFLAGS=""
|
APXS_EXTRA_CFLAGS=""
|
||||||
|
Reference in New Issue
Block a user