mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-16 17:41:52 +03:00
Reference RuleWithActions & Transaction object instead of copying values in RuleMessage
- Because the lifetime of the RuleMessage instances do not extend beyond the lifetime of the enclosing RuleWithActions & Transaction, RuleMessage can just reference it and simplify its definition. - Additionally, make the references const to show that it doesn't modify it. - Replace RuleMessage copy constructor with default implementations. - Removed unused RuleMessage assignment operator (which cannot be implemented now that it has reference members). - Removed constructor from RuleMessage pointer. - Addressed Sonarcloud suggestions: Do not use the constructor's initializer list for data member "xxx". Use the in-class initializer instead.
This commit is contained in:
@@ -74,7 +74,7 @@ void MultipartPartTmpFile::Open() {
|
||||
strftime(tstr, std::size(tstr), "/%Y%m%d-%H%M%S", &timeinfo);
|
||||
|
||||
std::string path = m_transaction->m_rules->m_uploadDirectory.m_value;
|
||||
path = path + tstr + "-" + *m_transaction->m_id.get();
|
||||
path = path + tstr + "-" + m_transaction->m_id;
|
||||
path += "-file-XXXXXX";
|
||||
|
||||
#ifndef WIN32
|
||||
|
||||
Reference in New Issue
Block a user