Disable rendering widgets on federated pages (security)

pull/1219/merge
Zef Hemel 2025-02-08 20:38:41 +01:00
parent 38dc5bb11c
commit 8f29cef717
1 changed files with 2 additions and 1 deletions

View File

@ -179,5 +179,6 @@ export const invisibleDecoration = Decoration.replace({});
export function shouldRenderWidgets(client: Client) { export function shouldRenderWidgets(client: Client) {
const currentPageMeta = client.ui.viewState.currentPageMeta; const currentPageMeta = client.ui.viewState.currentPageMeta;
return !currentPageMeta?.tags?.includes("template") && return !currentPageMeta?.tags?.includes("template") &&
currentPageMeta?.pageDecoration?.renderWidgets !== false; currentPageMeta?.pageDecoration?.renderWidgets !== false &&
!currentPageMeta?.name.startsWith("!");
} }