fix(auth/UX): trim username in login & setup (#6263)

This commit is contained in:
Tobi 2025-10-26 19:24:42 +01:00 committed by GitHub
parent b7bb961eac
commit 7bf25ba1bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,8 +18,8 @@ exports.login = async function (username, password) {
return null;
}
let user = await R.findOne("user", " username = ? AND active = 1 ", [
username,
let user = await R.findOne("user", "TRIM(username) = ? AND active = 1 ", [
username.trim(),
]);
if (user && passwordHash.verify(password, user.password)) {