Merge pull request #4086 from NicodeSS/release fix: lowercase remote-user header in authelia auto-login procedure

1ae4c22ebc3352ffb429fd0599468b5f55b5c1b9

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
2 files changed, +2 -2Showing whitespace changes
default/config.yaml+1 -1
@@ -70,7 +70,7 @@ enableDiscreetLogin: false
70# https://www.authelia.com/70# https://www.authelia.com/
71# This will use auto login to an account with the same username71# This will use auto login to an account with the same username
72# as that used for authlia. (Ensure the username in authlia72# as that used for authlia. (Ensure the username in authlia
73# is an exact match with that in sillytavern)73# is an exact match in lowercase with that in sillytavern)
74autheliaAuth: false74autheliaAuth: false
75# If `basicAuthMode` and this are enabled then75# If `basicAuthMode` and this are enabled then
76# the username and passwords for basic auth are the same as those76# the username and passwords for basic auth are the same as those
src/users.js+1 -1
@@ -760,7 +760,7 @@ async function autheliaUserLogin(request) {
760760
761 const userHandles = await getAllUserHandles();761 const userHandles = await getAllUserHandles();
762 for (const userHandle of userHandles) {762 for (const userHandle of userHandles) {
763 if (remoteUser === userHandle) {763 if (remoteUser.toLowerCase() === userHandle) {
764 const user = await storage.getItem(toKey(userHandle));764 const user = await storage.getItem(toKey(userHandle));
765 if (user && user.enabled) {765 if (user && user.enabled) {
766 request.session.handle = userHandle;766 request.session.handle = userHandle;