Fix password changing getting stuck if wrong password is entered once

This commit is contained in:
sfan5
2022-04-27 19:32:51 +02:00
parent 1ac378063e
commit a55982e7f0
3 changed files with 13 additions and 0 deletions

View File

@@ -596,6 +596,15 @@ void RemoteClient::notifyEvent(ClientStateEvent event)
}
}
void RemoteClient::resetChosenMech()
{
if (chosen_mech == AUTH_MECHANISM_SRP) {
srp_verifier_delete((SRPVerifier *) auth_data);
auth_data = nullptr;
}
chosen_mech = AUTH_MECHANISM_NONE;
}
u64 RemoteClient::uptime() const
{
return porting::getTimeS() - m_connection_time;