From 1ba8ce2353144250c49efb7c6ee457a5152cc019 Mon Sep 17 00:00:00 2001 From: Cris <22254235+o0101@users.noreply.github.com> Date: Wed, 20 Mar 2024 16:13:17 +0800 Subject: [PATCH] Update UIWindow.js Adding `allow-storage-access-by-user-activation` which is important for permitting Safari to ask the user if the embedded app can use cookies, which enhances security, privacy and user consent. See here for more discussion: https://github.com/HeyPuter/puter/issues/143#issuecomment-2008692100 --- src/UI/UIWindow.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UI/UIWindow.js b/src/UI/UIWindow.js index 07b0d8e4..9a9db4f9 100644 --- a/src/UI/UIWindow.js +++ b/src/UI/UIWindow.js @@ -296,7 +296,7 @@ async function UIWindow(options) { ${options.iframe_url ? 'src="'+ html_encode(options.iframe_url)+'"' : ''} ${options.iframe_srcdoc ? 'srcdoc="'+ html_encode(options.iframe_srcdoc) +'"' : ''} allow = "accelerometer; camera; encrypted-media; gamepad; display-capture; geolocation; gyroscope; microphone; midi; clipboard-read; clipboard-write; web-share; fullscreen;" - sandbox="allow-forms allow-modals allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation allow-downloads allow-presentation">`; + sandbox="allow-forms allow-modals allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation allow-downloads allow-presentation allow-storage-access-by-user-activation">`; } // custom body else if(options.body_content !== undefined){ @@ -3262,4 +3262,4 @@ document.addEventListener('scroll', function (event) { } }, true); -export default UIWindow; \ No newline at end of file +export default UIWindow;