From c79b2913a2a36f24c9069294661b5bc4f31b6c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20Haugsb=C3=B8?= Date: Sun, 18 Dec 2022 17:16:19 +0100 Subject: [PATCH] Auth: Case insensitive login check on username Allows users to add users with capital letters and then login with just lowercase letters. We accidentally capitalized the first letter of our username so the other people using it frequently thinks they wrote the wrong password. --- server/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/auth.js b/server/auth.js index 3ce1a604..9bb9dd01 100644 --- a/server/auth.js +++ b/server/auth.js @@ -15,7 +15,7 @@ exports.login = async function (username, password) { return null; } - let user = await R.findOne("user", " username = ? AND active = 1 ", [ + let user = await R.findOne("user", " username LIKE ? AND active = 1 ", [ username, ]);