mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2026-01-01 06:09:03 +03:00
Uses unique_ptr on REMOTE_USER
This commit is contained in:
committed by
Felipe Zimmerle
parent
820396f784
commit
7afcd3046d
@@ -186,7 +186,6 @@ Transaction::Transaction(ModSecurity *ms, RulesSet *rules, void *logCbData)
|
||||
m_json(NULL),
|
||||
#endif
|
||||
m_secRuleEngine(RulesSetProperties::PropertyNotSetRuleEngine),
|
||||
m_variableRemoteUser(""),
|
||||
m_logCbData(logCbData),
|
||||
TransactionAnchoredVariables(this),
|
||||
TransactionRuleMessageManagement(this) {
|
||||
@@ -252,7 +251,6 @@ Transaction::Transaction(ModSecurity *ms, RulesSet *rules, char *id, void *logCb
|
||||
m_json(NULL),
|
||||
#endif
|
||||
m_secRuleEngine(RulesSetProperties::PropertyNotSetRuleEngine),
|
||||
m_variableRemoteUser(""),
|
||||
m_logCbData(logCbData),
|
||||
TransactionAnchoredVariables(this),
|
||||
TransactionRuleMessageManagement(this) {
|
||||
@@ -1466,14 +1464,8 @@ std::string Transaction::toOldAuditLogFormatIndex(const std::string &filename,
|
||||
m_variableRequestHeaders.resolveFirst("Host").get())
|
||||
<< " ";
|
||||
ss << utils::string::dash_if_empty(this->m_clientIpAddress->c_str()) << " ";
|
||||
/** TODO: Check variable */
|
||||
variables::RemoteUser *r = new variables::RemoteUser("REMOTE_USER");
|
||||
VariableValues l;
|
||||
r->evaluate(this, &l);
|
||||
delete r;
|
||||
|
||||
ss << utils::string::dash_if_empty(
|
||||
m_variableRemoteUser.c_str());
|
||||
ss << utils::string::dash_if_empty(variables::RemoteUser::parserRemoteUser(this).first.c_str());
|
||||
ss << " ";
|
||||
/** TODO: Check variable */
|
||||
//ss << utils::string::dash_if_empty(
|
||||
|
||||
Reference in New Issue
Block a user