Files
Sparkle/Sparkle/SUWebViewCommon.m
T
Zorg 01d19ca92e Ignore opening about:blank URLs
Fix from 8f19f6a8cc which I regressed accidentally.
2021-01-18 09:12:16 -08:00

21 lines
576 B
Objective-C

//
// SUWebViewCommon.m
// Sparkle
//
// Created by Mayur Pawashe on 12/31/20.
// Copyright © 2020 Sparkle Project. All rights reserved.
//
#import "SUWebViewCommon.h"
BOOL SUWebViewIsSafeURL(NSURL *url, BOOL *isAboutBlankURL)
{
NSString *scheme = url.scheme;
BOOL isAboutBlank = [url.absoluteString isEqualToString:@"about:blank"];
BOOL whitelistedSafe = isAboutBlank || [@[@"http", @"https", @"macappstore", @"macappstores", @"itms-apps", @"itms-appss"] containsObject:scheme];
*isAboutBlankURL = isAboutBlank;
return whitelistedSafe;
}