Only allow login via basic per-user if user password is set

06a7bdd3ce950cdf7152fc12a95b04f7110bb3d9

QuantumEntangledAndy <sheepchaan@gmail.com>

Signed
2 files changed, +0 -9Ignore whitespace
src/middleware/basicAuth.js+0 -4
@@ -43,10 +43,6 @@ const basicAuthMiddleware = async function (request, response, callback) {
4343 if (user && user.enabled && (user.password && user.password === getPasswordHash(password, user.salt))) {
4444 return callback();
4545 }
46- else if (user && user.enabled && !user.password && !password) {
47- // Login to an account without password
48- return callback();
49- }
5046 }
5147 }
5248 }
src/users.js+0 -5
@@ -678,11 +678,6 @@ async function basicUserLogin(request) {
678678 request.session.handle = userHandle;
679679 return true;
680680 }
681- else if (user && user.enabled && !user.password && !password) {
682- // Login to an account without password
683- request.session.handle = userHandle;
684- return true;
685- }
686681 }
687682 }
688683