Merge pull request #4086 from NicodeSS/release

fix: lowercase remote-user header in authelia auto-login procedure
This commit is contained in:
Cohee
2025-06-02 17:27:54 +03:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ enableDiscreetLogin: false
# https://www.authelia.com/ # https://www.authelia.com/
# This will use auto login to an account with the same username # This will use auto login to an account with the same username
# as that used for authlia. (Ensure the username in authlia # as that used for authlia. (Ensure the username in authlia
# is an exact match with that in sillytavern) # is an exact match in lowercase with that in sillytavern)
autheliaAuth: false autheliaAuth: false
# If `basicAuthMode` and this are enabled then # If `basicAuthMode` and this are enabled then
# the username and passwords for basic auth are the same as those # the username and passwords for basic auth are the same as those

View File

@@ -760,7 +760,7 @@ async function autheliaUserLogin(request) {
const userHandles = await getAllUserHandles(); const userHandles = await getAllUserHandles();
for (const userHandle of userHandles) { for (const userHandle of userHandles) {
if (remoteUser === userHandle) { if (remoteUser.toLowerCase() === userHandle) {
const user = await storage.getItem(toKey(userHandle)); const user = await storage.getItem(toKey(userHandle));
if (user && user.enabled) { if (user && user.enabled) {
request.session.handle = userHandle; request.session.handle = userHandle;