mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Adds connector information to the audit logs
This commit is contained in:
parent
2138dd1369
commit
cb8d6249a8
@ -157,6 +157,7 @@ class Assay {
|
||||
std::string id;
|
||||
std::ofstream myfile;
|
||||
Rules *m_rules;
|
||||
ModSecurity *m_ms;
|
||||
|
||||
const char *m_clientIpAddress;
|
||||
const char *m_serverIpAddress;
|
||||
|
@ -88,7 +88,8 @@ Assay::Assay(ModSecurity *ms, Rules *rules)
|
||||
save_in_auditlog(false),
|
||||
do_not_save_in_auditlog(false),
|
||||
m_timeStamp(std::time(NULL)),
|
||||
http_code_returned(200) {
|
||||
http_code_returned(200),
|
||||
m_ms(ms) {
|
||||
id = std::to_string(this->m_timeStamp) + \
|
||||
std::to_string(generate_assay_unique_id());
|
||||
m_rules->incrementReferenceCount();
|
||||
@ -784,6 +785,9 @@ std::string Assay::to_json(int parts) {
|
||||
/* producer > libmodsecurity */
|
||||
LOGFY_ADD("modsecurity", ModSecurity::whoAmI().c_str());
|
||||
|
||||
/* producer > connector */
|
||||
LOGFY_ADD("connector", m_ms->getConnectorInformation().c_str());
|
||||
|
||||
/* end: producer */
|
||||
yajl_gen_map_close(g);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user