From fc118ec15a33a6cacd9520b1bce49a2d46171b04 Mon Sep 17 00:00:00 2001 From: Kyle Hickinson Date: Wed, 22 Feb 2023 17:50:26 -0500 Subject: [PATCH] Fix #6997: Only load urls via QR code that are http/https --- Sources/Brave/Frontend/Browser/BrowserViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Brave/Frontend/Browser/BrowserViewController.swift b/Sources/Brave/Frontend/Browser/BrowserViewController.swift index 23eb899325a..81059290787 100644 --- a/Sources/Brave/Frontend/Browser/BrowserViewController.swift +++ b/Sources/Brave/Frontend/Browser/BrowserViewController.swift @@ -2280,7 +2280,7 @@ public class BrowserViewController: UIViewController { let qrCodeController = RecentSearchQRCodeScannerController { [weak self] string in guard let self = self else { return } - if let url = URIFixup.getURL(string) { + if let url = URIFixup.getURL(string), url.isWebPage(includeDataURIs: false) { self.didScanQRCodeWithURL(url) } else { self.didScanQRCodeWithText(string)