aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/main.js b/main.js
index 877383a..0bc659c 100644
--- a/main.js
+++ b/main.js
@@ -245,11 +245,10 @@ function createJitsiMeetWindow() {
};
mainWindow.webContents.session.webRequest.onBeforeSendHeaders(fileFilter, (details, callback) => {
- const requestedUrl = new URL.URL(details.url);
- const requestedBasename = path.resolve(decodeURIComponent(requestedUrl.pathname));
+ const requestedPath = path.resolve(URL.fileURLToPath(details.url));
const appBasePath = path.resolve(basePath);
- if (!requestedBasename.startsWith(appBasePath)) {
+ if (!requestedPath.startsWith(appBasePath)) {
callback({ cancel: true });
console.warn(`Rejected file URL: ${details.url}`);