From ee69316b2a8b3997397afa573f6beb16746e6580 Mon Sep 17 00:00:00 2001 From: Zac West <74188+zacwest@users.noreply.github.com> Date: Wed, 18 Nov 2020 08:24:08 -0800 Subject: [PATCH] Fix crash when URL is configured to non-http/https scheme (#1279) Fixes #1252. --- Sources/App/WebView/WebViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/App/WebView/WebViewController.swift b/Sources/App/WebView/WebViewController.swift index ea3c80476..ee5c41791 100644 --- a/Sources/App/WebView/WebViewController.swift +++ b/Sources/App/WebView/WebViewController.swift @@ -191,7 +191,7 @@ class WebViewController: UIViewController, WKNavigationDelegate, WKUIDelegate, U return } - guard scheme.hasPrefix("http") else { + guard ["http", "https"].contains(scheme) else { Current.Log.warning("Was going to provide invalid URL to NSUserActivity! \(currentURL)") return }