Makes m_uri_no_query_string_decoded a shared pointer

This commit is contained in:
Felipe Zimmerle 2019-01-22 15:36:33 -03:00
parent d7d5cd2a91
commit 14b2bd77a0
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277
3 changed files with 4 additions and 4 deletions

View File

@ -110,7 +110,7 @@ class RuleMessage {
bool m_saveMessage; bool m_saveMessage;
std::shared_ptr<std::string> m_serverIpAddress; std::shared_ptr<std::string> m_serverIpAddress;
int m_severity; int m_severity;
std::string m_uriNoQueryStringDecoded; std::shared_ptr<std::string> m_uriNoQueryStringDecoded;
std::string m_ver; std::string m_ver;
std::list<std::string> m_tags; std::list<std::string> m_tags;

View File

@ -410,7 +410,7 @@ class Transaction : public TransactionAnchoredVariables {
/** /**
* Holds the URI that was requests (without the query string). * Holds the URI that was requests (without the query string).
*/ */
std::string m_uri_no_query_string_decoded; std::shared_ptr<std::string> m_uri_no_query_string_decoded;
/** /**
* Holds the combined size of all arguments, later used to fill the * Holds the combined size of all arguments, later used to fill the

View File

@ -42,7 +42,7 @@ std::string RuleMessage::_details(const RuleMessage *rm) {
} }
msg.append(" [hostname \"" + *rm->m_serverIpAddress.get() \ msg.append(" [hostname \"" + *rm->m_serverIpAddress.get() \
+ "\"]"); + "\"]");
msg.append(" [uri \"" + utils::string::limitTo(200, rm->m_uriNoQueryStringDecoded) + "\"]"); msg.append(" [uri \"" + utils::string::limitTo(200, *rm->m_uriNoQueryStringDecoded.get()) + "\"]");
msg.append(" [unique_id \"" + rm->m_id + "\"]"); msg.append(" [unique_id \"" + rm->m_id + "\"]");
msg.append(" [ref \"" + utils::string::limitTo(200, rm->m_reference) + "\"]"); msg.append(" [ref \"" + utils::string::limitTo(200, rm->m_reference) + "\"]");
@ -54,7 +54,7 @@ std::string RuleMessage::_errorLogTail(const RuleMessage *rm) {
std::string msg; std::string msg;
msg.append("[hostname \"" + *rm->m_serverIpAddress.get() + "\"]"); msg.append("[hostname \"" + *rm->m_serverIpAddress.get() + "\"]");
msg.append(" [uri \"" + utils::string::limitTo(200, rm->m_uriNoQueryStringDecoded) + "\"]"); msg.append(" [uri \"" + utils::string::limitTo(200, *rm->m_uriNoQueryStringDecoded.get()) + "\"]");
msg.append(" [unique_id \"" + rm->m_id + "\"]"); msg.append(" [unique_id \"" + rm->m_id + "\"]");
return msg; return msg;