From 3e577d134ef322fb844287476da6708059f09a12 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 30 Jan 2024 09:02:19 +0100 Subject: [PATCH] Bug 35935: Ensure login branch will be used after incorrect login If a different branch is selected after an incorrect login, the previous branch will be used. To recreate: * login with foo/bar, select CPL => FAIL * login with koha/koha, select another branch => OK but CPL is picked! It was caused by a dup of "branch" in CGI param list (and first was picked). This patch patch also removes "koha_login_context" to not have it twice. You can also open the source of the page to confirm that form#loginform contains "branch" and "koha_login_context" in hidden inputs. Signed-off-by: Magnus Enger Tested in KTD. Works as advertised. Signed-off-by: Julian Maurice --- koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt index 73e97bc8647..1980f4dce98 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt @@ -125,6 +125,8 @@
[% FOREACH INPUT IN INPUTS %] + [% NEXT IF INPUT.name == "koha_login_context" %] + [% NEXT IF INPUT.name == "branch" %] [% END %]

-- 2.30.2