Skip to content

Commit 14b2bd7

Browse files
committed
Makes m_uri_no_query_string_decoded a shared pointer
1 parent d7d5cd2 commit 14b2bd7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

headers/modsecurity/rule_message.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class RuleMessage {
110110
bool m_saveMessage;
111111
std::shared_ptr<std::string> m_serverIpAddress;
112112
int m_severity;
113-
std::string m_uriNoQueryStringDecoded;
113+
std::shared_ptr<std::string> m_uriNoQueryStringDecoded;
114114
std::string m_ver;
115115

116116
std::list<std::string> m_tags;

headers/modsecurity/transaction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ class Transaction : public TransactionAnchoredVariables {
410410
/**
411411
* Holds the URI that was requests (without the query string).
412412
*/
413-
std::string m_uri_no_query_string_decoded;
413+
std::shared_ptr<std::string> m_uri_no_query_string_decoded;
414414

415415
/**
416416
* Holds the combined size of all arguments, later used to fill the

src/rule_message.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ std::string RuleMessage::_details(const RuleMessage *rm) {
4242
}
4343
msg.append(" [hostname \"" + *rm->m_serverIpAddress.get() \
4444
+ "\"]");
45-
msg.append(" [uri \"" + utils::string::limitTo(200, rm->m_uriNoQueryStringDecoded) + "\"]");
45+
msg.append(" [uri \"" + utils::string::limitTo(200, *rm->m_uriNoQueryStringDecoded.get()) + "\"]");
4646
msg.append(" [unique_id \"" + rm->m_id + "\"]");
4747
msg.append(" [ref \"" + utils::string::limitTo(200, rm->m_reference) + "\"]");
4848

@@ -54,7 +54,7 @@ std::string RuleMessage::_errorLogTail(const RuleMessage *rm) {
5454
std::string msg;
5555

5656
msg.append("[hostname \"" + *rm->m_serverIpAddress.get() + "\"]");
57-
msg.append(" [uri \"" + utils::string::limitTo(200, rm->m_uriNoQueryStringDecoded) + "\"]");
57+
msg.append(" [uri \"" + utils::string::limitTo(200, *rm->m_uriNoQueryStringDecoded.get()) + "\"]");
5858
msg.append(" [unique_id \"" + rm->m_id + "\"]");
5959

6060
return msg;

0 commit comments

Comments
 (0)