mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-28 05:14:34 +00:00
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.
This commit is contained in:
1 parent
9568732f78
commit
8f19f6a8cc
1 file changed
+3
-2
Vendored
+3
-2
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user