feat(Core/Common): delete old Tokenizer (#10121)
This commit is contained in:
parent
a25ef74de3
commit
6d7f58e6ed
24 changed files with 284 additions and 225 deletions
|
|
@ -31,6 +31,7 @@
|
|||
#include "TOTP.h"
|
||||
#include "Timer.h"
|
||||
#include "Util.h"
|
||||
#include "StringConvert.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
|
|
@ -484,7 +485,7 @@ bool AuthSession::HandleLogonProof()
|
|||
std::string token(reinterpret_cast<char*>(GetReadBuffer().GetReadPointer() + sizeof(sAuthLogonProof_C) + sizeof(size)), size);
|
||||
GetReadBuffer().ReadCompleted(sizeof(size) + size);
|
||||
|
||||
uint32 incomingToken = atoi(token.c_str());
|
||||
uint32 incomingToken = *Acore::StringTo<uint32>(token);
|
||||
tokenSuccess = Acore::Crypto::TOTP::ValidateToken(*_totpSecret, incomingToken);
|
||||
memset(_totpSecret->data(), 0, _totpSecret->size());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue