From 1c573e2fb5e85867e62c34e1ecbc0b70573eb17e Mon Sep 17 00:00:00 2001 From: CanadaHonk Date: Sun, 9 Apr 2023 00:39:53 +0100 Subject: [PATCH] index: mark blank local CSP as dangerous option --- src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 018eed9..8179f4e 100644 --- a/src/index.js +++ b/src/index.js @@ -80,9 +80,10 @@ const getParentDir = () => { return dirname(place); }; -const checkForDangerousOptions = ({ allowHTTP, allowNavigation }) => { +const checkForDangerousOptions = ({ allowHTTP, allowNavigation, localCSP }) => { if (allowHTTP === true) dangerousAPI('Gluon.open', 'allowHTTP', 'true'); if (allowNavigation === true) dangerousAPI('Gluon.open', 'allowNavigation', 'true'); + if (localCSP === '') dangerousAPI('Gluon.open', 'localCSP', '\'\''); }; export const open = async (url, opts = {}) => {