Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

fix(iframe-widget): permission selection not applying to any origin (#4616)

Meier Lukas479f083ab8ec
diff --git a/packages/widgets/src/iframe/component.tsx b/packages/widgets/src/iframe/component.tsx
index 760c46b03..67fa73536 100644
--- a/packages/widgets/src/iframe/component.tsx
+++ b/packages/widgets/src/iframe/component.tsx
@@ -27,7 +27,7 @@ export default function IFrameWidget({ options, isEditMode }: WidgetComponentPro
className={classes.iframe}
src={embedUrl}
title="widget iframe"
- allow={allowedPermissions.join(" ")}
+ allow={allowedPermissions}
scrolling={allowScrolling ? "yes" : "no"}
sandbox={sandboxFlags.join(" ")}
>
@@ -77,9 +77,13 @@ const UnsupportedProtocol = () => {
const getAllowedPermissions = (
permissions: Omit<WidgetComponentProps<"iframe">["options"], "embedUrl" | "allowScrolling">,
) => {
- return objectEntries(permissions)
- .filter(([_key, value]) => value)
- .map(([key]) => permissionMapping[key]);
+ return (
+ objectEntries(permissions)
+ .filter(([_key, value]) => value)
+ // * means it applies to all origins
+ .map(([key]) => `${permissionMapping[key]} *`)
+ .join("; ")
+ );
};
const getSandboxFlags = (