1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2025-11-27 22:48:46 +02:00

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

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