From f70bd2eafc2fdac9fa528a3e649db0178c601b41 Mon Sep 17 00:00:00 2001 From: xXx-caillou-xXx Date: Mon, 18 Dec 2017 16:27:00 +0100 Subject: Fix cookie encryption Previously, when a cookie was set with the `httpOnly` flag, it was automatically encrypted, due to a logic flaw. This is now fixed and tested.--- src/tests/config/config_samesite_cookies.ini | 2 +- src/tests/samesite_cookies.phpt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/tests') diff --git a/src/tests/config/config_samesite_cookies.ini b/src/tests/config/config_samesite_cookies.ini index 9fb5f25..1ca498a 100644 --- a/src/tests/config/config_samesite_cookies.ini +++ b/src/tests/config/config_samesite_cookies.ini @@ -1,5 +1,5 @@ sp.global.secret_key("abcdef").cookie_env_var("REMOTE_ADDR"); sp.cookie.name("super_cookie").samesite("Lax"); sp.cookie.name("awful_cookie").samesite("strict").encrypt(); -sp.cookie.name("nice_cookie").samesite("STRICT"); +sp.cookie.name("nice_cookie").samesite("STRICT").encrypt(); sp.auto_cookie_secure.enable(); diff --git a/src/tests/samesite_cookies.phpt b/src/tests/samesite_cookies.phpt index 70fe10c..12f3d72 100644 --- a/src/tests/samesite_cookies.phpt +++ b/src/tests/samesite_cookies.phpt @@ -16,11 +16,13 @@ EOF;