mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Fix the audit log engine status selection
SecAuditEngine was not being respected by the auditlog generation
This commit is contained in:
parent
2e9a35c358
commit
1218d8c845
@ -216,6 +216,9 @@ bool AuditLog::init(std::string *error) {
|
||||
m_writer = new audit_log::writer::Parallel(this);
|
||||
}
|
||||
|
||||
if (m_status == OffAuditLogStatus || m_status == NotSetLogStatus) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (m_writer == NULL || m_writer->init(error) == false) {
|
||||
return false;
|
||||
@ -256,6 +259,10 @@ bool AuditLog::saveIfRelevant(Transaction *transaction) {
|
||||
|
||||
|
||||
bool AuditLog::saveIfRelevant(Transaction *transaction, int parts) {
|
||||
if (m_status == OffAuditLogStatus || m_status == NotSetLogStatus) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this->isRelevant(transaction->m_httpCodeReturned) == false &&
|
||||
transaction->m_toBeSavedInAuditlogs == false) {
|
||||
transaction->debug(5, "Return code `" +
|
||||
|
@ -272,7 +272,7 @@
|
||||
},
|
||||
"expected":{
|
||||
"audit_log":"",
|
||||
"debug_log":"Saving this request as part of the audit log.",
|
||||
"debug_log":"Request was relevant to be saved.",
|
||||
"http_code": 302
|
||||
},
|
||||
"rules":[
|
||||
|
Loading…
x
Reference in New Issue
Block a user