[bug] Fix basic auto-logins to disabled users
| @@ -674,11 +674,11 @@ async function basicUserLogin(request) { | ||
| 674 | 674 | if (login == userHandle) { |
| 675 | 675 | const user = await storage.getItem(toKey(userHandle)); |
| 676 | 676 | // Verify pass again here just to be sure |
| 677 | 677 | if (user && user.enabled && user.password && user.password === getPasswordHash(password, user.salt)) { |
| 678 | 678 | request.session.handle = userHandle; |
| 679 | 679 | return true; |
| 680 | 680 | } |
| 681 | 681 | else if (user && user.enabled && !user.password && !password) { |
| 682 | 682 | // Login to an account without password |
| 683 | 683 | request.session.handle = userHandle; |
| 684 | 684 | return true; |