From 1f34ec1330ff15692e04ab47414bf6a652b705dd 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 Signed-off-by: Fridolin Somers --- C4/Templates.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Templates.pm b/C4/Templates.pm index 53e1dc5073..a3903ca26a 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.39.5