Skip to content

Commit

Permalink
Do not allow configuring tabs with javascript no matter what (#26932)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon-T authored Dec 12, 2024
1 parent 12d7911 commit 73b6be9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,10 @@ class TabManager: NSObject {
&& Preferences.Privacy.persistentPrivateBrowsing.value)

// WebKit can sometimes return a URL that isn't valid at all!
if let requestURL = request?.url, NSURL(idnString: requestURL.absoluteString) == nil {
// Do not allow configuring a tab with a Bookmarklet or Javascript URL
if let requestURL = request?.url,
NSURL(idnString: requestURL.absoluteString) == nil || requestURL.isBookmarklet
{
request?.url = TabManager.aboutBlankBlockedURL
}

Expand Down

0 comments on commit 73b6be9

Please sign in to comment.