mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Setting http response code on the auditlog
This commit is contained in:
parent
274f9e5aa1
commit
34e8b140e5
2
CHANGES
2
CHANGES
@ -2,6 +2,8 @@
|
||||
v3.0.????? - ?
|
||||
---------------------------
|
||||
|
||||
- Setting http response code on the auditlog.
|
||||
[Issue #1592 - @zimmerle]
|
||||
- Refactoring on RuleMessage class, now accepting http code as parameter.
|
||||
[@zimmerle]
|
||||
- Having disruptive msgs as disruptive [instead of warnings] on audit log
|
||||
|
@ -72,6 +72,9 @@ class RuleMessage {
|
||||
std::string log(int props) {
|
||||
return RuleMessage::log(this, props);
|
||||
}
|
||||
std::string log(int props, int responseCode) {
|
||||
return RuleMessage::log(this, props, responseCode);
|
||||
}
|
||||
std::string errorLog() {
|
||||
return RuleMessage::log(this, ClientLogMessageInfo | ErrorLogTailLogMessageInfo);
|
||||
}
|
||||
|
@ -1485,7 +1485,7 @@ std::string Transaction::toOldAuditLogFormat(int parts,
|
||||
if (parts & audit_log::AuditLog::HAuditLogPart) {
|
||||
audit_log << "--" << trailer << "-" << "H--" << std::endl;
|
||||
for (auto a : m_rulesMessages) {
|
||||
audit_log << a.log() << std::endl;
|
||||
audit_log << a.log(0, m_httpCodeReturned) << std::endl;
|
||||
}
|
||||
audit_log << std::endl;
|
||||
/** TODO: write audit_log H part. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user