Skip to content

Commit

Permalink
Auth: Add safeguard against too high pin count
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Oct 20, 2024
1 parent 5625410 commit 9d29b59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/realmd/AuthSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ bool AuthSocket::_HandleLogonProof()
std::shared_ptr<uint8> pinCount = std::make_shared<uint8>();
self->Read((char*)pinCount.get(), sizeof(uint8), [self, pinCount, lp](const boost::system::error_code& error, std::size_t read)
{
if (error)
if (error || *pinCount > 16)
{
self->Write(logonProofUnknownAccountPinInvalid, sizeof(logonProofUnknownAccountPinInvalid), [self](const boost::system::error_code& error, std::size_t read) { self->Close();});
return;
Expand Down

0 comments on commit 9d29b59

Please sign in to comment.