From 8f19f6a8ccacc7ba9fcc1807f2fe5fd43a6c3097 Mon Sep 17 00:00:00 2001 From: Louis Pontoise Date: Tue, 12 May 2020 02:12:54 +0900 Subject: [PATCH] fix: when the user set a release note url, and that page was creating iframes without src attributes, these would make popups appear saying "There is no application set to open the URL about:blank." A request URL to about:blank has no purpose of being opened, so we ignore it. --- Sparkle/SUUpdateAlert.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index 667ed9e0..0848bae5 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -352,7 +352,8 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE { NSURL *requestURL = request.URL; NSString *scheme = requestURL.scheme; - BOOL whitelistedSafe = [scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"] || [requestURL.absoluteString isEqualToString:@"about:blank"]; + BOOL isAboutBlank = [requestURL.absoluteString isEqualToString:@"about:blank"]; + BOOL whitelistedSafe = [scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"] || isAboutBlank; // Do not allow redirects to dangerous protocols such as file:// if (!whitelistedSafe) { @@ -362,7 +363,7 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE } if (self.webViewFinishedLoading) { - if (requestURL) { + if (requestURL && !isAboutBlank) { [[NSWorkspace sharedWorkspace] openURL:requestURL]; }