mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-18 17:12:14 +11:00
🐛 switched conditional oops
This commit is contained in:
parent
9fce1fd083
commit
c82a90f054
1 changed files with 12 additions and 13 deletions
|
|
@ -31,6 +31,18 @@ void UserFilter<set_body_flag, require_admin>::doFilter(const HttpRequestPtr &re
|
||||||
base64_result[middle] = '\0';
|
base64_result[middle] = '\0';
|
||||||
const std::string &username(results_view.substr(0, middle).data());
|
const std::string &username(results_view.substr(0, middle).data());
|
||||||
if constexpr (require_admin)
|
if constexpr (require_admin)
|
||||||
|
{
|
||||||
|
if (bank.AdminVerifyAccount(username))
|
||||||
|
{
|
||||||
|
base64_result[new_sz] = '\0';
|
||||||
|
if (bank.VerifyPassword(std::move(username), results_view.substr(middle + 1)))
|
||||||
|
{
|
||||||
|
fccb();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
base64_result[new_sz] = '\0';
|
base64_result[new_sz] = '\0';
|
||||||
if (bank.VerifyPassword(username, results_view.substr(middle + 1)))
|
if (bank.VerifyPassword(username, results_view.substr(middle + 1)))
|
||||||
|
|
@ -43,19 +55,6 @@ void UserFilter<set_body_flag, require_admin>::doFilter(const HttpRequestPtr &re
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
if (bank.AdminVerifyAccount(username))
|
|
||||||
{
|
|
||||||
base64_result[new_sz] = '\0';
|
|
||||||
if (bank.VerifyPassword(std::move(username), results_view.substr(middle + 1)))
|
|
||||||
{
|
|
||||||
fccb();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue