You've already forked uptime-kuma
mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-11-29 23:07:33 +02:00
fix(auth/UX): trim username in login & setup (#6263)
This commit is contained in:
@@ -18,8 +18,8 @@ exports.login = async function (username, password) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
let user = await R.findOne("user", " username = ? AND active = 1 ", [
|
let user = await R.findOne("user", "TRIM(username) = ? AND active = 1 ", [
|
||||||
username,
|
username.trim(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (user && passwordHash.verify(password, user.password)) {
|
if (user && passwordHash.verify(password, user.password)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user