From ead7303f78552eec433e020b04e0511459045bfc Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 20 Jun 2024 10:34:33 +0100 Subject: [PATCH] Remove outdated iframe sandbox attribute (#12633) Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/messages/MFileBody.tsx | 2 +- src/utils/FileDownloader.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/messages/MFileBody.tsx b/src/components/views/messages/MFileBody.tsx index 12d4c80416..bf4922615f 100644 --- a/src/components/views/messages/MFileBody.tsx +++ b/src/components/views/messages/MFileBody.tsx @@ -288,7 +288,7 @@ export default class MFileBody extends React.Component { src={url} onLoad={() => this.downloadFile(this.fileName, this.linkText)} ref={this.iframe} - sandbox="allow-scripts allow-downloads allow-downloads-without-user-activation" + sandbox="allow-scripts allow-downloads" /> )} diff --git a/src/utils/FileDownloader.ts b/src/utils/FileDownloader.ts index a2c89d0228..39a9a5cd0c 100644 --- a/src/utils/FileDownloader.ts +++ b/src/utils/FileDownloader.ts @@ -47,7 +47,7 @@ function getManagedIframe(): { iframe: HTMLIFrameElement; onLoadPromise: Promise // @ts-ignore // noinspection JSConstantReassignment - managedIframe.sandbox = "allow-scripts allow-downloads allow-downloads-without-user-activation"; + managedIframe.sandbox = "allow-scripts allow-downloads"; onLoadPromise = new Promise((resolve) => { managedIframe.onload = () => {