From 7bf25ba1bff80dac10169eb20c82c3a69f557c5c Mon Sep 17 00:00:00 2001 From: Tobi <84527857+reussio@users.noreply.github.com> Date: Sun, 26 Oct 2025 19:24:42 +0100 Subject: [PATCH] fix(auth/UX): trim username in login & setup (#6263) --- server/auth.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/auth.js b/server/auth.js index a4aed50b8..f98d4c8b3 100644 --- a/server/auth.js +++ b/server/auth.js @@ -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)) {