From aa11a9e93496aec9287eee663bd44827b2256b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesi=C5=84ski?= Date: Mon, 14 Dec 2015 20:13:32 +0000 Subject: [PATCH] Warn about ATS blocking --- Sparkle/SUUpdater.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Sparkle/SUUpdater.m b/Sparkle/SUUpdater.m index 000fffb4..61836f94 100644 --- a/Sparkle/SUUpdater.m +++ b/Sparkle/SUUpdater.m @@ -142,6 +142,14 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults } else if (isMainBundle && !hasPublicDSAKey && !servingOverHttps) { SULog(@"WARNING: Serving updates over HTTP without signing them with a DSA key is deprecated and may not be possible in a future release. Please serve your updates over https, or sign them with a DSA key, or do both. See Sparkle's documentation for more information."); } + +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 + BOOL atsExceptionsExist = nil != [self.host objectForInfoDictionaryKey:@"NSAppTransportSecurity"]; + if (!servingOverHttps && !atsExceptionsExist) { + [self showModalAlertText:@"Insecure feed URL is blocked in OS X 10.11" + informativeText:[NSString stringWithFormat:@"You must change the feed URL (%@) to use HTTPS or disable App Transport Security.\n\nFor more information:\nhttp://sparkle-project.org/documentation/app-transport-security/", [feedURL absoluteString]]]; + } +#endif }