add fake delay for passwords which don't match security criteria

This commit is contained in:
einhornimmond 2021-06-07 17:37:28 +02:00
parent 42bca07bf7
commit c0c57bd28a

View File

@ -77,7 +77,7 @@ Poco::JSON::Object* JsonUnsecureLogin::handle(Poco::Dynamic::Var params)
Poco::JSON::Object* result = new Poco::JSON::Object;
if (!password.size() || !sm->checkPwdValidation(password, &pwd_errors, LanguageManager::getInstance()->getFreeCatalog(LANG_EN))) {
Poco::Thread::sleep(ServerConfig::g_FakeLoginSleepTime);
result->set("state", "error");
result->set("msg", pwd_errors.getLastError()->getString(false));
if (pwd_errors.errorCount()) {