Skip to content

Commit

Permalink
Support App Store URL scheme in release note webview
Browse files Browse the repository at this point in the history
  • Loading branch information
Bi11 authored and kornelski committed Sep 3, 2020
1 parent 7c7e924 commit f2fc729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sparkle/SUUpdateAlert.m
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ - (void)webView:(WebView *)__unused sender decidePolicyForNavigationAction:(NSDi
NSURL *requestURL = request.URL;
NSString *scheme = requestURL.scheme;
BOOL isAboutBlank = [requestURL.absoluteString isEqualToString:@"about:blank"];
BOOL whitelistedSafe = [scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"] || isAboutBlank;
BOOL whitelistedSafe = isAboutBlank || [@[@"http", @"https", @"macappstore", @"macappstores", @"itms-apps", @"itms-appss"] containsObject:scheme];

// Do not allow redirects to dangerous protocols such as file://
if (!whitelistedSafe) {
Expand Down

0 comments on commit f2fc729

Please sign in to comment.