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

pull/6268/head
Tobi 6 months ago committed by GitHub
parent b7bb961eac
commit 7bf25ba1bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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)) {

Loading…
Cancel
Save