mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 03:57:47 +03:00
Checks if an assay is relevant to be saved as an auditlog
This commit is contained in:
@@ -136,6 +136,24 @@ bool AuditLog::isRelevant(int status) {
|
||||
|
||||
|
||||
bool AuditLog::saveIfRelevant(Assay *assay) {
|
||||
if (this->isRelevant(assay->http_code_returned) == false &&
|
||||
assay->save_in_auditlog == false) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Even if it is relevant, if it is marked not to be save,
|
||||
* we won't save it.
|
||||
*
|
||||
*/
|
||||
if (assay->do_not_save_in_auditlog == true) {
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string log = logfy(assay);
|
||||
|
||||
m_writer->write(log);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user