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

Commit9244cd9

Browse files
Marc SternFelipe Zimmerle
Marc Stern
authored and
Felipe Zimmerle
committed
Option to disable logging of "Server" in audit log when log level < 9. [Issueowasp-modsecurity#1070 - Marc Stern]
1 parentc1c91e2 commit9244cd9

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

‎CHANGES‎

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

4+
* {dis|en}able-server-logging: Option to disable logging of
5+
"Server" in audit log when log level < 9.
6+
[Issue #1070 - Marc Stern]
47
* {dis|en}able-filename-logging: Option to disable logging of filename
58
in audit log.
69
[Issue #1065 - Marc Stern]

‎apache2/msc_logging.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,6 +2004,9 @@ void sec_audit_logger_native(modsec_rec *msr) {
20042004
sec_auditlog_write_producer_header(msr);
20052005

20062006
/* Server */
2007+
#ifdefLOG_NO_SERVER
2008+
if (msr->txcfg->debuglog_level >=9)
2009+
#endif
20072010
if (msr->server_software!=NULL) {
20082011
text=apr_psprintf(msr->mp,"Server: %s\n",msr->server_software);
20092012
sec_auditlog_write(msr,text,strlen(text));

‎configure.ac‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,21 @@ AC_ARG_ENABLE(filename-logging,
442442
log_filename=''
443443
])
444444

445+
# Disable logging of "Server"
446+
AC_ARG_ENABLE(server-logging,
447+
AS_HELP_STRING([--enable-server-logging],
448+
[Enable logging of "Server" in audit log when log level < 9. This is the default]),
449+
[
450+
if test "$enableval" != "no"; then
451+
log_server=
452+
else
453+
log_server="-DLOG_NO_SERVER"
454+
fi
455+
],
456+
[
457+
log_server=''
458+
])
459+
445460
# Ignore configure errors
446461
AC_ARG_ENABLE(errors,
447462
AS_HELP_STRING([--disable-errors],
@@ -692,7 +707,7 @@ else
692707
fi
693708
fi
694709

695-
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"
710+
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"
696711

697712
APXS_WRAPPER=build/apxs-wrapper
698713
APXS_EXTRA_CFLAGS=""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp