move check if all passwords allow direct into pwdValidation so it will work with every code which ask for password

This commit is contained in:
einhornimmond 2021-02-26 16:34:52 +01:00 committed by Ulf Gebhardt
parent e7856ca7f9
commit e2c38c1a0f
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD
2 changed files with 627 additions and 623 deletions

View File

@ -51,7 +51,7 @@ Poco::JSON::Object* JsonCreateUser::handle(Poco::Dynamic::Var params)
if (password.size()) {
ErrorList errors;
if (!(ServerConfig::g_AllowUnsecureFlags & ServerConfig::UNSECURE_ALLOW_ALL_PASSWORDS) && !sm->checkPwdValidation(password, &errors)) {
if (!sm->checkPwdValidation(password, &errors)) {
Poco::JSON::Object* result = new Poco::JSON::Object;
result->set("state", "error");
result->set("msg", errors.getLastError()->getString(false));

File diff suppressed because it is too large Load Diff