From faae19231ed22e8db2442ab3426e804cb4a63197 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 4 Jan 2022 10:24:18 -0500 Subject: [PATCH] Bug 29791: KohaOpacLanguage cookie should set the secure flag if using https To test, the headers should have value set-cookie: secure; for the language cookie, when the site is using https. Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- C4/Templates.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Templates.pm b/C4/Templates.pm index 53e1dc50736..a3903ca26ae 100644 --- a/C4/Templates.pm +++ b/C4/Templates.pm @@ -349,6 +349,7 @@ sub getlanguagecookie { -value => $language, -HttpOnly => 1, -expires => '+3y' + -secure => ( C4::Context->https_enabled() ? 1 : 0 ), ); return $cookie; -- 2.25.1