Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion DuckDuckGo/Tab/Model/Tab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down