]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
utils: clear cookies with secure flag set
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 18 Mar 2022 10:00:11 +0000 (11:00 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 18 Mar 2022 14:56:20 +0000 (15:56 +0100)
otherwise firefox complains with a deprecation warning that the secure-flag
is not set but SameSite to 'None'. Since we cannot know how firefox will
behave once that behaviour is no longer supported, add the secure flag
now.

Note: ExtJS also clears by setting the cookie with an empty value,
there's no browser supported clear api.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/Utils.js

index 6781e4459800315f3a6cc381ca528ffcda58ee81..52cc626f1438b6bf1023e5b109cc5b5ecebe07c1 100644 (file)
@@ -306,7 +306,7 @@ utilities: {
        if (Proxmox.LoggedOut) {
            return;
        }
-       Ext.util.Cookies.clear(Proxmox.Setup.auth_cookie_name);
+       Ext.util.Cookies.set(Proxmox.Setup.auth_cookie_name, "", new Date(0), null, null, true);
        window.localStorage.removeItem("ProxmoxUser");
     },