diff --git a/src/PVE/APIServer/Formatter.pm b/src/PVE/APIServer/Formatter.pm index 20455a0..142127a 100644 --- a/src/PVE/APIServer/Formatter.pm +++ b/src/PVE/APIServer/Formatter.pm @@ -92,7 +92,7 @@ sub create_auth_cookie { my $encticket = uri_escape($ticket); - return "${cookie_name}=$encticket; path=/; secure;"; + return "${cookie_name}=$encticket; path=/; secure; SameSite=Strict;"; } sub create_auth_header { diff --git a/src/PVE/APIServer/Formatter/Bootstrap.pm b/src/PVE/APIServer/Formatter/Bootstrap.pm index 001ad2b..9fb7785 100644 --- a/src/PVE/APIServer/Formatter/Bootstrap.pm +++ b/src/PVE/APIServer/Formatter/Bootstrap.pm @@ -88,7 +88,7 @@ sub body { $jssetup .= "PVE.delete_auth_cookie = function() {\n"; if ($self->{cookie_name}) { - $jssetup .= " document.cookie = \"$self->{cookie_name}=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/; secure;\";\n"; + $jssetup .= " document.cookie = \"$self->{cookie_name}=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/; secure; SameSite=Strict;\";\n"; }; $jssetup .= "};\n";