fix: lowercase remote-user header in authelia auto-login procedure Ensure the remote-user header is lowercased to fix case-sensitivity issues in the authelia auto-login process, improving compatibility.

cfa9ef4726833d0e7c5dff6c18fd4575385c0d5f

Nicode <RD_Nicode@outlook.com>

2 files changed, +2 -2Ignore whitespace
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;