From 2001d9b27371b5b695efbc827f207dcd976f0ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Thu, 11 Jun 2026 21:30:46 +0200 Subject: [PATCH] Add login_service value when the redirection URL misses it Closes #14893 (grafted from 71ff74ce33b49ee8639c3bac8ce43bf7ec3a627e) --HG-- branch : 7.0 --- modules/authentication_saml/routes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/authentication_saml/routes.py b/modules/authentication_saml/routes.py index 658fcdeeb8..1435272933 100644 --- a/modules/authentication_saml/routes.py +++ b/modules/authentication_saml/routes.py @@ -161,6 +161,9 @@ def acs(request, pool, identity): redirect_url = http_host() parts = urllib.parse.urlsplit(redirect_url) query = urllib.parse.parse_qsl(parts.query) + if 'login_service' not in dict(query): + query.append( + ('login_service', f'/authentication/saml/{identity}/login')) query.append(('database', pool.database_name)) query.append(('login', login)) query.append(('user_id', user_id))