mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Adds m_uri_no_query_string_decoded to transaction
This commit is contained in:
@@ -45,7 +45,7 @@ std::string RuleMessage::errorLog(Transaction *trans) {
|
||||
}
|
||||
msg.append(" [hostname \"" + std::string(trans->m_serverIpAddress) \
|
||||
+ "\"]");
|
||||
msg.append(" [uri \"" + std::string(trans->m_uri) + "\"]");
|
||||
msg.append(" [uri \"" + trans->m_uri_no_query_string_decoded + "\"]");
|
||||
msg.append(" [unique_id \"" + trans->m_id + "\"]");
|
||||
|
||||
return modsecurity::utils::string::toHexIfNeeded(msg);
|
||||
|
@@ -102,6 +102,7 @@ Transaction::Transaction(ModSecurity *ms, Rules *rules, void *logCbData)
|
||||
m_clientPort(0),
|
||||
m_serverPort(0),
|
||||
m_uri(""),
|
||||
m_uri_no_query_string_decoded(""),
|
||||
m_method(""),
|
||||
m_httpVersion(""),
|
||||
m_rules(rules),
|
||||
@@ -384,6 +385,12 @@ int Transaction::processURI(const char *uri, const char *method,
|
||||
m_collections.store("REQUEST_LINE", std::string(method) + " " +
|
||||
std::string(uri) + " HTTP/" + std::string(http_version));
|
||||
|
||||
if (pos != std::string::npos) {
|
||||
m_uri_no_query_string_decoded = std::string(m_uri_decoded, 0, pos);
|
||||
} else {
|
||||
m_uri_no_query_string_decoded = std::string(m_uri_decoded);
|
||||
}
|
||||
|
||||
if (pos_raw != std::string::npos) {
|
||||
m_collections.store("QUERY_STRING", std::string(uri_s, pos_raw + 1,
|
||||
uri_s.length() - (pos_raw + 1)));
|
||||
|
Reference in New Issue
Block a user