diff --git a/DuckDuckGo/Tab/Model/Tab.swift b/DuckDuckGo/Tab/Model/Tab.swift index 898216a0bd..2939b419a4 100644 --- a/DuckDuckGo/Tab/Model/Tab.swift +++ b/DuckDuckGo/Tab/Model/Tab.swift @@ -724,7 +724,9 @@ protocol NewWindowPolicyDecisionMaker { func reload() { userInteractionDialog = nil - if let error = error, let failingUrl = error.failingUrl { + + // In the case of an error only reload web URLs to prevent uxss attacks via redirecting to javascript:// + if let error = error, let failingUrl = error.failingUrl, (failingUrl.isHttp || failingUrl.isHttps) { webView.load(URLRequest(url: failingUrl, cachePolicy: .reloadIgnoringLocalCacheData)) return }