From 04e4b187bcd8aeb6f411ff45fdde225efe2adc65 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 : 8.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 7fc1cf5a78..469c6faa2a 100644 --- a/modules/authentication_saml/routes.py +++ b/modules/authentication_saml/routes.py @@ -168,6 +168,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))