Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Check for origin mismatch before displaying mixed content warning
Browse files Browse the repository at this point in the history
This fixes a bug where navigating back/forward between NTP & web pages may show 'not secure' on NTP for a brief moment
  • Loading branch information
kylehickinson committed Nov 17, 2023
1 parent 58739f5 commit 8f6a7c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/Brave/Frontend/Browser/BrowserViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1770,7 +1770,8 @@ public class BrowserViewController: UIViewController {
break
}

if tab.secureContentState == .secure && !webView.hasOnlySecureContent {
if tab.secureContentState == .secure, !webView.hasOnlySecureContent,
tab.url?.origin == tab.webView?.url?.origin {
if let url = tab.webView?.url, url.isReaderModeURL {
break
}
Expand Down

0 comments on commit 8f6a7c5

Please sign in to comment.