diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig index 80cc9ac1..d5b355a8 100644 --- a/Configurations/ConfigCommon.xcconfig +++ b/Configurations/ConfigCommon.xcconfig @@ -87,4 +87,4 @@ CLANG_ENABLE_MODULES[sdk=macosx10.8] = NO WARNING_CFLAGS_EXTRA = -Wno-custom-atomic-properties -Wno-implicit-atomic-properties // Turn on all warnings, then disable a few which are almost impossible to avoid -WARNING_CFLAGS = -Wall -Weverything -Wno-unused-macros -Wno-gnu-statement-expression -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wno-auto-import -Wno-partial-availability -Wno-dollar-in-identifier-extension $(WARNING_CFLAGS_EXTRA) +WARNING_CFLAGS = -Wall -Weverything -Wno-unused-macros -Wno-gnu-statement-expression -Wno-arc-repeated-use-of-weak -Wno-auto-import -Wno-partial-availability -Wno-dollar-in-identifier-extension $(WARNING_CFLAGS_EXTRA) diff --git a/Sparkle/SUOperatingSystem.m b/Sparkle/SUOperatingSystem.m index 85c18ebc..d411b4dd 100644 --- a/Sparkle/SUOperatingSystem.m +++ b/Sparkle/SUOperatingSystem.m @@ -20,7 +20,8 @@ { NSOperatingSystemVersion version = { 0, 0, 0 }; NSURL *coreServices = [[NSFileManager defaultManager] URLForDirectory:NSCoreServiceDirectory inDomain:NSSystemDomainMask appropriateForURL:nil create:NO error:nil]; - NSArray *components = [[NSDictionary dictionaryWithContentsOfURL:[coreServices URLByAppendingPathComponent:@"SystemVersion.plist"]][@"ProductVersion"] componentsSeparatedByString:@"."]; + NSURL* systemVersionPlistUrl = [coreServices URLByAppendingPathComponent:@"SystemVersion.plist"]; + NSArray *components = [[NSDictionary dictionaryWithContentsOfURL:systemVersionPlistUrl][@"ProductVersion"] componentsSeparatedByString:@"."]; version.majorVersion = components.count > 0 ? [components[0] integerValue] : 0; version.minorVersion = components.count > 1 ? [components[1] integerValue] : 0; version.patchVersion = components.count > 2 ? [components[2] integerValue] : 0; diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index 3433299d..9a6b649f 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -258,7 +258,8 @@ { NSURL *requestURL = request.URL; NSString *scheme = requestURL.scheme; - BOOL whitelistedSafe = [@"http" isEqualToString:scheme] || [@"https" isEqualToString:scheme] || [@"about:blank" isEqualToString:requestURL.absoluteString]; + NSString *url = requestURL.absoluteString; + BOOL whitelistedSafe = [@"http" isEqualToString:scheme] || [@"https" isEqualToString:scheme] || [@"about:blank" isEqualToString:url]; // Do not allow redirects to dangerous protocols such as file:// if (!whitelistedSafe) {