Fixing logo problem in email

This commit is contained in:
stephb9959
2021-11-12 08:06:21 -08:00
parent 9d956c13f7
commit 5931c91054
2 changed files with 8 additions and 19 deletions

View File

@@ -66,21 +66,28 @@ namespace OpenWifi {
bool MFAServer::CompleteMFAChallenge(Poco::JSON::Object::Ptr &ChallengeResponse, SecurityObjects::UserInfoAndPolicy &UInfo) {
std::lock_guard G(Mutex_);
std::cout << __func__ << ":" << __LINE__ << std::endl;
if(!ChallengeResponse->has("uuid") || !ChallengeResponse->has("answer"))
return false;
auto uuid = ChallengeResponse->get("uuid").toString();
auto Hint = Cache_.find(uuid);
if(Hint == end(Cache_))
std::cout << __func__ << ":" << __LINE__ << "UUID:" << uuid << std::endl;
if(Hint == end(Cache_)) {
std::cout << __func__ << ":" << __LINE__ << std::endl;
return false;
}
auto answer = ChallengeResponse->get("answer").toString();
std::cout << __func__ << ":" << __LINE__ << Hint->second.Answer << " == " << answer << std::endl;
if(Hint->second.Answer!=answer) {
std::cout << __func__ << ":" << __LINE__ << std::endl;
return false;
}
UInfo = Hint->second.UInfo;
Cache_.erase(Hint);
std::cout << __func__ << ":" << __LINE__ << std::endl;
return true;
}