From 94d65a8e08b9826800a8e83a83298971e8841221 Mon Sep 17 00:00:00 2001 From: meixu Date: Thu, 29 Oct 2026 12:44:09 +0800 Subject: [PATCH] Prevent anonymous redirects from overwriting Authelia sessions Closes #634 --- readme-vars.yml | 1 + root/defaults/nginx/authelia-server.conf.sample | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/readme-vars.yml b/readme-vars.yml index 82a6beee..8a7159b5 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -220,6 +220,7 @@ init_diagram: | "swag:latest" <- Base Images # changelog changelogs: + - {date: "29.10.26:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) authelia-server.conf - Prevent anonymous redirects from overwriting newer Authelia sessions."} - {date: "20.10.26:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) proxy.conf, authelia-server.conf, authentik-server.conf, tinyauth-server.conf - Update Nginx configuration to replace $http_host with $host$is_request_port$request_port for better compatibility."} - {date: "09.09.26:", desc: "Use new X-Tinyauth-Location header in Tinyauth locations and remove duplicate auth module headers."} - {date: "19.07.26:", desc: "Rebase to Alpine 3.24 with PHP 8.5."} diff --git a/root/defaults/nginx/authelia-server.conf.sample b/root/defaults/nginx/authelia-server.conf.sample index a3f76527..2c9be21b 100644 --- a/root/defaults/nginx/authelia-server.conf.sample +++ b/root/defaults/nginx/authelia-server.conf.sample @@ -1,4 +1,4 @@ -## Version 2026/10/20 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authelia-server.conf.sample +## Version 2026/10/29 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authelia-server.conf.sample # Make sure that your authelia container is in the same user defined bridge network and is named authelia # Rename /config/nginx/proxy-confs/authelia.subdomain.conf.sample to /config/nginx/proxy-confs/authelia.subdomain.conf @@ -23,9 +23,7 @@ location = /authelia/api/authz/auth-request { location @authelia_proxy_signin { internal; - ## Include the Set-Cookie header if present - auth_request_set $set_cookie $upstream_http_set_cookie; - add_header Set-Cookie $set_cookie; + ## Avoid overwriting a newer portal session with an earlier anonymous response ## Set the $target_url variable based on the original request set_escape_uri $target_url $scheme://$host$is_request_port$request_port$request_uri;