[pve-devel] [PATCH widget-toolkit] Utils: clear cookies with secure flag set

Dominik Csapak d.csapak at proxmox.com
Fri Mar 18 11:00:11 CET 2022


otherwise firefox complains with a deprecation warning that the secureflag
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.

we have to use the 'set' api of ExtJs to do that reliably

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/Utils.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Utils.js b/src/Utils.js
index 6781e44..52cc626 100644
--- a/src/Utils.js
+++ b/src/Utils.js
@@ -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");
     },
 
-- 
2.30.2






More information about the pve-devel mailing list