mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-06 06:16:51 +03:00
Adds option to disable logging of Apache handler in audit log
This commit is contained in:
committed by
Felipe Zimmerle
parent
f44852b4e0
commit
d1376c5525
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-handler-logging: Option to disable logging of Apache handler
|
||||||
|
in audit log
|
||||||
|
[Issue #1070, #1381 - Marc Stern]
|
||||||
* {dis|en}able-collection-delete-problem-logging: Option to disable logging of
|
* {dis|en}able-collection-delete-problem-logging: Option to disable logging of
|
||||||
collection delete problem in audit log when log level < 9.
|
collection delete problem in audit log when log level < 9.
|
||||||
[Issue #1380 - Marc Stern]
|
[Issue #1380 - Marc Stern]
|
||||||
|
@@ -1974,6 +1974,9 @@ void sec_audit_logger_native(modsec_rec *msr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Apache-Handler */
|
/* Apache-Handler */
|
||||||
|
#ifdef LOG_NO_HANDLER
|
||||||
|
if (msr->txcfg->debuglog_level >= 9)
|
||||||
|
#endif
|
||||||
if (msr->r->handler != NULL) {
|
if (msr->r->handler != NULL) {
|
||||||
text = apr_psprintf(msr->mp, "Apache-Handler: %s\n", msr->r->handler);
|
text = apr_psprintf(msr->mp, "Apache-Handler: %s\n", msr->r->handler);
|
||||||
sec_auditlog_write(msr, text, strlen(text));
|
sec_auditlog_write(msr, text, strlen(text));
|
||||||
|
15
configure.ac
15
configure.ac
@@ -472,6 +472,21 @@ AC_ARG_ENABLE(collection-delete-problem-logging,
|
|||||||
log_collection_delete_problem=''
|
log_collection_delete_problem=''
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# Disable logging of Apache handler
|
||||||
|
AC_ARG_ENABLE(handler-logging,
|
||||||
|
AS_HELP_STRING([--enable-handler-logging],
|
||||||
|
[Enable logging of Apache handler in audit log when log level < 9. This is the default]),
|
||||||
|
[
|
||||||
|
if test "$enableval" != "no"; then
|
||||||
|
log_handler=
|
||||||
|
else
|
||||||
|
log_handler="-DLOG_NO_HANDLER"
|
||||||
|
fi
|
||||||
|
],
|
||||||
|
[
|
||||||
|
log_handler=''
|
||||||
|
])
|
||||||
|
|
||||||
# Ignore configure errors
|
# Ignore configure errors
|
||||||
AC_ARG_ENABLE(errors,
|
AC_ARG_ENABLE(errors,
|
||||||
AS_HELP_STRING([--disable-errors],
|
AS_HELP_STRING([--disable-errors],
|
||||||
|
Reference in New Issue
Block a user