mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-15 17:12:14 +03:00
Change http_version field in JSON audit log to string
Sometimes m_httpVersion variable can be empty and then invalid JSON is generated
This commit is contained in:
@@ -1599,7 +1599,7 @@ std::string Transaction::toJSON(int parts) {
|
|||||||
utils::string::dash_if_empty(
|
utils::string::dash_if_empty(
|
||||||
m_variableRequestMethod.evaluate()));
|
m_variableRequestMethod.evaluate()));
|
||||||
|
|
||||||
LOGFY_ADD_INT("http_version", m_httpVersion.c_str());
|
LOGFY_ADD("http_version", m_httpVersion);
|
||||||
LOGFY_ADD("uri", this->m_uri);
|
LOGFY_ADD("uri", this->m_uri);
|
||||||
|
|
||||||
if (parts & audit_log::AuditLog::CAuditLogPart) {
|
if (parts & audit_log::AuditLog::CAuditLogPart) {
|
||||||
|
|||||||
Reference in New Issue
Block a user