From cce5cd7c94afd32caff7f8874d2de47db574e271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E8=B0=B7=20=E5=87=8C?= Date: Sun, 22 Dec 2024 23:46:31 +0800 Subject: [PATCH] fix canFetch origin issue Originally found by @jexjws --- src/containers/tw-security-manager.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/containers/tw-security-manager.jsx b/src/containers/tw-security-manager.jsx index ea7104a43c3..416b24e804f 100644 --- a/src/containers/tw-security-manager.jsx +++ b/src/containers/tw-security-manager.jsx @@ -281,6 +281,7 @@ class TWSecurityManagerComponent extends React.Component { if (isAlwaysTrustedForFetching(parsed)) { return true; } + const origin = (parsed.protocol === 'http:' || parsed.protocol === 'https:') ? parsed.origin : null; const {showModal, releaseLock} = await this.acquireModalLock(); if (fetchOriginsTrustedByUser.has(origin)) { releaseLock();