Reset WebUI ban counter on login success

This commit is contained in:
Chocobo1 2018-05-29 16:52:22 +08:00
parent d782d62b34
commit 5c72a52ea2
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C

View File

@ -69,6 +69,8 @@ void AuthController::loginAction()
const bool equalPass = Utils::String::slowEquals(passwordFromWebHashed.toUtf8(), password.toUtf8()); const bool equalPass = Utils::String::slowEquals(passwordFromWebHashed.toUtf8(), password.toUtf8());
if (equalUser && equalPass) { if (equalUser && equalPass) {
m_clientFailedLogins.remove(clientAddr);
sessionManager()->sessionStart(); sessionManager()->sessionStart();
setResult(QLatin1String("Ok.")); setResult(QLatin1String("Ok."));
LogMsg(tr("WebAPI login success. IP: %1").arg(clientAddr)); LogMsg(tr("WebAPI login success. IP: %1").arg(clientAddr));