mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-20 02:57:12 +03:00
Avoids string copy by working with pointers while resolving variables
This commit is contained in:
@@ -57,9 +57,10 @@ void RemoteUser::evaluateInternal(Transaction *transaction,
|
||||
if (pos == std::string::npos) {
|
||||
return;
|
||||
}
|
||||
base64 = std::string(base64, 0, pos);
|
||||
transaction->m_variableRemoteUser.assign(std::string(base64, 0, pos));
|
||||
|
||||
l->push_back(new collection::Variable("REMOTE_USER", base64));
|
||||
l->push_back(new collection::Variable(&m_retName,
|
||||
&transaction->m_variableRemoteUser));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user