mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
Merge pull request #3214 from gberkes/v3/Use_the_init-statement_to_declare_pos_inside_the_if_statement
Refactor: used the init-statement to declare "pos" inside the if statement
This commit is contained in:
commit
e8db92ebb0
@ -56,8 +56,7 @@ void RemoteUser::evaluate(Transaction *transaction,
|
|||||||
|
|
||||||
base64 = Utils::Base64::decode(base64);
|
base64 = Utils::Base64::decode(base64);
|
||||||
|
|
||||||
const auto pos = base64.find(":");
|
if (const auto pos{base64.find(":")}; pos != std::string::npos) {
|
||||||
if (pos != std::string::npos) {
|
|
||||||
transaction->m_variableRemoteUser.assign(std::string(base64, 0, pos));
|
transaction->m_variableRemoteUser.assign(std::string(base64, 0, pos));
|
||||||
|
|
||||||
auto var = std::make_unique<VariableValue>(&v->getKeyWithCollection(),
|
auto var = std::make_unique<VariableValue>(&v->getKeyWithCollection(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user