don't give away the info about security criteria of password

This commit is contained in:
einhornimmond 2021-06-07 17:39:12 +02:00
parent c0c57bd28a
commit 81a6b2a0a2

View File

@ -79,10 +79,8 @@ Poco::JSON::Object* JsonUnsecureLogin::handle(Poco::Dynamic::Var params)
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()) {
result->set("details", pwd_errors.getLastError()->getString(false));
}
result->set("msg", "password incorrect");
return result;
}