From fec76fee12fae88c3f9f3737b50f9aff9e34e01f Mon Sep 17 00:00:00 2001 From: Zorg Date: Thu, 1 Sep 2016 23:14:26 -0400 Subject: [PATCH 1/9] Validate binary delta patches before unarchiving Also keep package and bundle validation separate. --- Sparkle/SUBasicUpdateDriver.m | 126 +++++++++++++++++++++--------- Sparkle/SUBinaryDeltaUnarchiver.m | 5 ++ Sparkle/SUDiskImageUnarchiver.m | 5 ++ Sparkle/SUPipedUnarchiver.m | 5 ++ Sparkle/SUUnarchiver.h | 3 + Sparkle/SUUnarchiver.m | 5 ++ 6 files changed, 112 insertions(+), 37 deletions(-) diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index 2a942bb1..0bf71d20 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -31,6 +31,8 @@ @property (copy) NSString *tempDir; @property (copy) NSString *relaunchPath; +@property (nonatomic) BOOL validatedDsaSignatureBeforeUnarchiving; + @end @implementation SUBasicUpdateDriver @@ -43,6 +45,8 @@ @synthesize tempDir; @synthesize relaunchPath; +@synthesize validatedDsaSignatureBeforeUnarchiving = _validatedDsaSignatureBeforeUnarchiving; + - (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)aHost { [super checkForUpdatesAtURL:URL host:aHost]; @@ -275,8 +279,6 @@ } /** - * If the update is a package, then it must be signed using DSA. No other verification is done. - * * If the update is a bundle, then it must meet any one of: * * * old and new DSA public keys are the same and valid (it allows change of Code Signing identity), or @@ -284,31 +286,9 @@ * * old and new Code Signing identity are the same and valid * */ -- (BOOL)validateUpdateDownloadedToPath:(NSString *)downloadedPath extractedToPath:(NSString *)extractedPath DSASignature:(NSString *)DSASignature publicDSAKey:(NSString *)publicDSAKey +- (BOOL)validateUpdateDownloadedToPath:(NSString *)downloadedPath newBundlePath:(NSString *)newBundlePath DSASignature:(NSString *)DSASignature publicDSAKey:(NSString *)publicDSAKey { - BOOL isPackage = NO; - NSString *installSourcePath = [SUInstaller installSourcePathInUpdateFolder:extractedPath forHost:self.host isPackage:&isPackage isGuided:NULL]; - if (installSourcePath == nil) { - SULog(@"No suitable install is found in the update. The update will be rejected."); - return NO; - } - - // Modern packages are not distributed as bundles and are code signed differently than regular applications - if (isPackage) { - if (nil == publicDSAKey) { - SULog(@"The existing app bundle does not have a DSA key, so it can't verify installer packages."); - } - - BOOL packageValidated = [SUDSAVerifier validatePath:downloadedPath withEncodedDSASignature:DSASignature withPublicDSAKey:publicDSAKey]; - - if (!packageValidated) { - SULog(@"DSA signature validation of the package failed. The update contains an installer package, and valid DSA signatures are mandatory for all installer packages. The update will be rejected. Sign the installer with a valid DSA key or use an .app bundle update instead."); - } - - return packageValidated; - } - - NSBundle *newBundle = [NSBundle bundleWithPath:installSourcePath]; + NSBundle *newBundle = [NSBundle bundleWithPath:newBundlePath]; if (newBundle == nil) { SULog(@"No suitable bundle is found in the update. The update will be rejected."); return NO; @@ -336,11 +316,11 @@ } } - BOOL updateIsCodeSigned = [SUCodeSigningVerifier applicationAtPathIsCodeSigned:installSourcePath]; + BOOL updateIsCodeSigned = [SUCodeSigningVerifier applicationAtPathIsCodeSigned:newBundlePath]; if (dsaKeysMatch) { NSError *error = nil; - if (updateIsCodeSigned && ![SUCodeSigningVerifier codeSignatureIsValidAtPath:installSourcePath error:&error]) { + if (updateIsCodeSigned && ![SUCodeSigningVerifier codeSignatureIsValidAtPath:newBundlePath error:&error]) { SULog(@"The update archive has a valid DSA signature, but the app is also signed with Code Signing, which is corrupted: %@. The update will be rejected.", error); return NO; } @@ -355,7 +335,7 @@ } NSError *error = nil; - if (![SUCodeSigningVerifier codeSignatureMatchesHostAndIsValidAtPath:installSourcePath error:&error]) { + if (![SUCodeSigningVerifier codeSignatureMatchesHostAndIsValidAtPath:newBundlePath error:&error]) { SULog(@"The update archive %@, and the app is signed with a new Code Signing identity that doesn't match code signing of the original app: %@. At least one method of signature verification must be valid. The update will be rejected.", dsaStatus, error); return NO; } @@ -405,17 +385,48 @@ - (void)extractUpdate { SUUnarchiver *unarchiver = [SUUnarchiver unarchiverForPath:self.downloadPath updatingHostBundlePath:[[self.host bundle] bundlePath] withPassword:self.updater.decryptionPassword]; + + BOOL success; if (!unarchiver) { SULog(@"Error: No valid unarchiver for %@!", self.downloadPath); + success = NO; + } else if ([[unarchiver class] requiresValidationBeforeUnarchiving]) { + // Currently just binary delta updates require validation before unarchiving + + NSString *publicDSAKey = self.host.publicDSAKey; + NSString *dsaSignature = self.updateItem.DSASignature; + + if (publicDSAKey == nil) { + SULog(@"Failed to validate update before unarchiving because no DSA key was found"); + success = NO; + } else if (dsaSignature == nil) { + SULog(@"Failed to validate update before unarchiving because no DSA signature was found"); + success = NO; + } else if (![SUDSAVerifier validatePath:self.downloadPath withEncodedDSASignature:dsaSignature withPublicDSAKey:publicDSAKey]) { + SULog(@"DSA signature validation before unarchiving failed for update %@", self.downloadPath); + success = NO; + } else { + success = YES; + self.validatedDsaSignatureBeforeUnarchiving = YES; + } + } else { + success = YES; + } + + if (!success) { [self unarchiverDidFail:nil]; return; + } else { + unarchiver.delegate = self; + [unarchiver start]; } - unarchiver.delegate = self; - [unarchiver start]; } - (void)failedToApplyDeltaUpdate { + // Clear this flag if we decide to do another full extraction + self.validatedDsaSignatureBeforeUnarchiving = NO; + // When a delta update fails to apply we fall back on updating via a full install. self.updateItem = self.nonDeltaUpdateItem; self.nonDeltaUpdateItem = nil; @@ -474,13 +485,54 @@ - (void)installWithToolAndRelaunch:(BOOL)relaunch displayingUserInterface:(BOOL)showUI { assert(self.updateItem); - - if (![self validateUpdateDownloadedToPath:self.downloadPath extractedToPath:self.tempDir DSASignature:self.updateItem.DSASignature publicDSAKey:self.host.publicDSAKey]) - { + + NSString *DSASignature = self.updateItem.DSASignature; + NSString *publicDSAKey = self.host.publicDSAKey; + + BOOL validationCheckSuccess; + BOOL isPackage = NO; + + // install source could point to a new bundle or a package + NSString *installSource = [SUInstaller installSourcePathInUpdateFolder:self.tempDir forHost:self.host isPackage:&isPackage isGuided:NULL]; + if (installSource == nil) { + SULog(@"No suitable install is found in the update. The update will be rejected."); + validationCheckSuccess = NO; + } else { + if (!self.validatedDsaSignatureBeforeUnarchiving) { + // Check to see if we have a package or bundle to validate + if (isPackage) { + // For package type updates, all we do is check if the DSA signature is valid + validationCheckSuccess = [SUDSAVerifier validatePath:self.downloadPath withEncodedDSASignature:DSASignature withPublicDSAKey:publicDSAKey]; + if (!validationCheckSuccess) { + SULog(@"DSA signature validation of the package failed. The update contains an installer package, and valid DSA signatures are mandatory for all installer packages. The update will be rejected. Sign the installer with a valid DSA key or use an .app bundle update instead."); + } + } else { + // For application bundle updates, we check both the DSA and Apple code signing signatures + validationCheckSuccess = [self validateUpdateDownloadedToPath:self.downloadPath newBundlePath:installSource DSASignature:DSASignature publicDSAKey:publicDSAKey]; + } + } else if (isPackage) { + // We shouldn't get here because we don't validate packages before extracting them currently + SULog(@"Error: not expecting to find package after being required to validate update before extraction"); + validationCheckSuccess = NO; + } else { + // Because we already validated the DSA signature, this is just a consistency check to see + // if the developer signed their application properly with their Apple ID + // Currently, this case only gets hit for binary delta updates + NSError *error = nil; + if ([SUCodeSigningVerifier applicationAtPathIsCodeSigned:installSource] && ![SUCodeSigningVerifier codeSignatureIsValidAtPath:installSource error:&error]) { + SULog(@"Failed to validate apple code sign signature on bundle after archive validation with error: %@", error); + validationCheckSuccess = NO; + } else { + validationCheckSuccess = YES; + } + } + } + + if (!validationCheckSuccess) { NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred while extracting the archive. Please try again later.", nil), - NSLocalizedFailureReasonErrorKey: SULocalizedString(@"The update is improperly signed.", nil), - }; + NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred while extracting the archive. Please try again later.", nil), + NSLocalizedFailureReasonErrorKey: SULocalizedString(@"The update is improperly signed.", nil), + }; [self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUSignatureError userInfo:userInfo]]; return; } diff --git a/Sparkle/SUBinaryDeltaUnarchiver.m b/Sparkle/SUBinaryDeltaUnarchiver.m index d08a4831..fd6aa38f 100644 --- a/Sparkle/SUBinaryDeltaUnarchiver.m +++ b/Sparkle/SUBinaryDeltaUnarchiver.m @@ -21,6 +21,11 @@ return [[path pathExtension] isEqualToString:@"delta"]; } ++ (BOOL)requiresValidationBeforeUnarchiving +{ + return YES; +} + // According to https://developer.apple.com/library/mac/documentation/Carbon/Conceptual/MDImporters/Concepts/Troubleshooting.html // We should make sure mdimporter bundles have an up to date time in the event they were delta updated. // We used to invoke mdimport on the bundle but this is not a very good approach. diff --git a/Sparkle/SUDiskImageUnarchiver.m b/Sparkle/SUDiskImageUnarchiver.m index c547b44b..97e6de6f 100644 --- a/Sparkle/SUDiskImageUnarchiver.m +++ b/Sparkle/SUDiskImageUnarchiver.m @@ -18,6 +18,11 @@ return [[path pathExtension] isEqualToString:@"dmg"]; } ++ (BOOL)requiresValidationBeforeUnarchiving +{ + return NO; +} + // Called on a non-main thread. - (void)extractDMG { diff --git a/Sparkle/SUPipedUnarchiver.m b/Sparkle/SUPipedUnarchiver.m index dcaad43e..0e626c61 100644 --- a/Sparkle/SUPipedUnarchiver.m +++ b/Sparkle/SUPipedUnarchiver.m @@ -41,6 +41,11 @@ return NULL; } ++ (BOOL)requiresValidationBeforeUnarchiving +{ + return NO; +} + - (void)start { [NSThread detachNewThreadSelector:[[self class] selectorConformingToTypeOfPath:self.archivePath] toTarget:self withObject:nil]; diff --git a/Sparkle/SUUnarchiver.h b/Sparkle/SUUnarchiver.h index ccd5611d..d86c76ac 100644 --- a/Sparkle/SUUnarchiver.h +++ b/Sparkle/SUUnarchiver.h @@ -23,7 +23,10 @@ + (SUUnarchiver *)unarchiverForPath:(NSString *)path updatingHostBundlePath:(NSString *)host withPassword:(NSString *)decryptionPassword; ++ (BOOL)requiresValidationBeforeUnarchiving; + - (void)start; + @end @protocol SUUnarchiverDelegate diff --git a/Sparkle/SUUnarchiver.m b/Sparkle/SUUnarchiver.m index e887f4ca..891ec7ee 100644 --- a/Sparkle/SUUnarchiver.m +++ b/Sparkle/SUUnarchiver.m @@ -55,6 +55,11 @@ return NO; } ++ (BOOL)requiresValidationBeforeUnarchiving +{ + return NO; +} + - (void)notifyDelegateOfProgress:(double)progress { if ([self.delegate respondsToSelector:@selector(unarchiver:extractedProgress:)]) { From e28c62244a8633f1f03d5a9ea495aded5d2ad743 Mon Sep 17 00:00:00 2001 From: Zorg Date: Thu, 1 Sep 2016 23:16:44 -0400 Subject: [PATCH 2/9] Re-show download status if we attempt a 2nd download This fixes a bug where the status would stay at "Extracting update" after validation from the 1st delta patch failed, and it continued on to a full download. --- Sparkle/SUUIBasedUpdateDriver.m | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/Sparkle/SUUIBasedUpdateDriver.m b/Sparkle/SUUIBasedUpdateDriver.m index 67782212..ccf02fbd 100644 --- a/Sparkle/SUUIBasedUpdateDriver.m +++ b/Sparkle/SUUIBasedUpdateDriver.m @@ -115,10 +115,6 @@ [self.host setObject:nil forUserDefaultsKey:SUSkippedVersionKey]; switch (choice) { case SUInstallUpdateChoice: - self.statusController = [[SUStatusController alloc] initWithHost:self.host]; - [self.statusController beginActionWithTitle:SULocalizedString(@"Downloading update...", @"Take care not to overflow the status window.") maxProgressValue:0.0 statusText:nil]; - [self.statusController setButtonTitle:SULocalizedString(@"Cancel", nil) target:self action:@selector(cancelDownload:) isDefault:NO]; - [self.statusController showWindow:self]; [self downloadUpdate]; break; @@ -138,6 +134,25 @@ } } +- (void)downloadUpdate +{ + BOOL createdStatusController = NO; + if (self.statusController == nil) { + self.statusController = [[SUStatusController alloc] initWithHost:self.host]; + createdStatusController = YES; + } + + [self.statusController beginActionWithTitle:SULocalizedString(@"Downloading update...", @"Take care not to overflow the status window.") maxProgressValue:0.0 statusText:nil]; + [self.statusController setButtonTitle:SULocalizedString(@"Cancel", nil) target:self action:@selector(cancelDownload:) isDefault:NO]; + [self.statusController setButtonEnabled:YES]; + + if (createdStatusController) { + [self.statusController showWindow:self]; + } + + [super downloadUpdate]; +} + - (void)download:(NSURLDownload *)__unused download didReceiveResponse:(NSURLResponse *)response { [self.statusController setMaxProgressValue:[response expectedContentLength]]; From 898e063b4f212d297b0e4353a0fe839575a063d0 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 4 Sep 2016 18:38:08 -0400 Subject: [PATCH 3/9] Remove unnecessary 'return;' --- Sparkle/SUBasicUpdateDriver.m | 1 - 1 file changed, 1 deletion(-) diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index 5346aa37..658f4478 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -416,7 +416,6 @@ if (!success) { [self unarchiverDidFail:nil]; - return; } else { unarchiver.delegate = self; [unarchiver start]; From c0b9eaaa0ebce74c157f354f8762005d4605fff9 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 3 Dec 2016 11:06:10 -0500 Subject: [PATCH 4/9] s/requiresValidationBeforUnarchiving/unsafeIfArchiveIsNotValidated/ --- Sparkle/SUBasicUpdateDriver.m | 2 +- Sparkle/SUBinaryDeltaUnarchiver.m | 2 +- Sparkle/SUDiskImageUnarchiver.m | 2 +- Sparkle/SUPipedUnarchiver.m | 2 +- Sparkle/SUUnarchiver.h | 2 +- Sparkle/SUUnarchiver.m | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index 658f4478..321f6801 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -391,7 +391,7 @@ if (!unarchiver) { SULog(@"Error: No valid unarchiver for %@!", self.downloadPath); success = NO; - } else if ([[unarchiver class] requiresValidationBeforeUnarchiving]) { + } else if ([[unarchiver class] unsafeIfArchiveIsNotValidated]) { // Currently just binary delta updates require validation before unarchiving NSString *publicDSAKey = self.host.publicDSAKey; diff --git a/Sparkle/SUBinaryDeltaUnarchiver.m b/Sparkle/SUBinaryDeltaUnarchiver.m index fd6aa38f..5ff34bd8 100644 --- a/Sparkle/SUBinaryDeltaUnarchiver.m +++ b/Sparkle/SUBinaryDeltaUnarchiver.m @@ -21,7 +21,7 @@ return [[path pathExtension] isEqualToString:@"delta"]; } -+ (BOOL)requiresValidationBeforeUnarchiving ++ (BOOL)unsafeIfArchiveIsNotValidated { return YES; } diff --git a/Sparkle/SUDiskImageUnarchiver.m b/Sparkle/SUDiskImageUnarchiver.m index 97e6de6f..e6f743e7 100644 --- a/Sparkle/SUDiskImageUnarchiver.m +++ b/Sparkle/SUDiskImageUnarchiver.m @@ -18,7 +18,7 @@ return [[path pathExtension] isEqualToString:@"dmg"]; } -+ (BOOL)requiresValidationBeforeUnarchiving ++ (BOOL)unsafeIfArchiveIsNotValidated { return NO; } diff --git a/Sparkle/SUPipedUnarchiver.m b/Sparkle/SUPipedUnarchiver.m index 0e626c61..0b0157c3 100644 --- a/Sparkle/SUPipedUnarchiver.m +++ b/Sparkle/SUPipedUnarchiver.m @@ -41,7 +41,7 @@ return NULL; } -+ (BOOL)requiresValidationBeforeUnarchiving ++ (BOOL)unsafeIfArchiveIsNotValidated { return NO; } diff --git a/Sparkle/SUUnarchiver.h b/Sparkle/SUUnarchiver.h index d86c76ac..e2f79f04 100644 --- a/Sparkle/SUUnarchiver.h +++ b/Sparkle/SUUnarchiver.h @@ -23,7 +23,7 @@ + (SUUnarchiver *)unarchiverForPath:(NSString *)path updatingHostBundlePath:(NSString *)host withPassword:(NSString *)decryptionPassword; -+ (BOOL)requiresValidationBeforeUnarchiving; ++ (BOOL)unsafeIfArchiveIsNotValidated; - (void)start; diff --git a/Sparkle/SUUnarchiver.m b/Sparkle/SUUnarchiver.m index 891ec7ee..b12d0648 100644 --- a/Sparkle/SUUnarchiver.m +++ b/Sparkle/SUUnarchiver.m @@ -55,7 +55,7 @@ return NO; } -+ (BOOL)requiresValidationBeforeUnarchiving ++ (BOOL)unsafeIfArchiveIsNotValidated { return NO; } From 1587dd1dc374644c4a5202908462a458a036868f Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 3 Dec 2016 15:37:00 -0500 Subject: [PATCH 5/9] Refactor pre & post update validation into its own class --- Sparkle.xcodeproj/project.pbxproj | 8 ++ Sparkle/SUBasicUpdateDriver.m | 154 +++--------------------- Sparkle/SUUpdateValidator.h | 25 ++++ Sparkle/SUUpdateValidator.m | 192 ++++++++++++++++++++++++++++++ 4 files changed, 240 insertions(+), 139 deletions(-) create mode 100644 Sparkle/SUUpdateValidator.h create mode 100644 Sparkle/SUUpdateValidator.m diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 861dad5b..a9e8c6a6 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -205,6 +205,8 @@ 7275F9C11B5F1F2900B1D19E /* SUFileManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 7275F9BF1B5F1F2900B1D19E /* SUFileManager.h */; }; 7275F9C21B5F1F2900B1D19E /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; }; 7275F9C31B5F1F2900B1D19E /* SUFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */; }; + 729924731DF3478A00DBCDF5 /* SUUpdateValidator.h in Headers */ = {isa = PBXBuildFile; fileRef = 729924711DF3478A00DBCDF5 /* SUUpdateValidator.h */; }; + 729924741DF3478A00DBCDF5 /* SUUpdateValidator.m in Sources */ = {isa = PBXBuildFile; fileRef = 729924721DF3478A00DBCDF5 /* SUUpdateValidator.m */; }; 72A4A2401BB6567D00E7820D /* SUFileManagerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72A4A23F1BB6567D00E7820D /* SUFileManagerTest.swift */; }; 72AC6B261B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B251B9AAC8800F62325 /* SparkleTestCodeSignApp.tar.gz */; }; 72AC6B281B9AAD6700F62325 /* SparkleTestCodeSignApp.tar in Resources */ = {isa = PBXBuildFile; fileRef = 72AC6B271B9AAD6700F62325 /* SparkleTestCodeSignApp.tar */; }; @@ -691,6 +693,8 @@ 726F2CE41BC9C33D001971A4 /* SUOperatingSystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUOperatingSystem.m; sourceTree = ""; }; 7275F9BF1B5F1F2900B1D19E /* SUFileManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUFileManager.h; sourceTree = ""; }; 7275F9C01B5F1F2900B1D19E /* SUFileManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUFileManager.m; sourceTree = ""; }; + 729924711DF3478A00DBCDF5 /* SUUpdateValidator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUUpdateValidator.h; sourceTree = ""; }; + 729924721DF3478A00DBCDF5 /* SUUpdateValidator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUUpdateValidator.m; sourceTree = ""; }; 729F10FD1C65A9B500DFCCC5 /* ConfigUITest.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUITest.xcconfig; sourceTree = ""; }; 729F10FE1C65A9B500DFCCC5 /* ConfigUITestCoverage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUITestCoverage.xcconfig; sourceTree = ""; }; 729F10FF1C65A9B500DFCCC5 /* ConfigUITestDebug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUITestDebug.xcconfig; sourceTree = ""; }; @@ -1135,6 +1139,8 @@ 61CFB2C10E384958007A1735 /* Support */ = { isa = PBXGroup; children = ( + 729924711DF3478A00DBCDF5 /* SUUpdateValidator.h */, + 729924721DF3478A00DBCDF5 /* SUUpdateValidator.m */, 61B078CC15A5FB6100600039 /* SUCodeSigningVerifier.h */, 61B078CD15A5FB6100600039 /* SUCodeSigningVerifier.m */, 61299A2D09CA2DAB00B7442F /* SUDSAVerifier.h */, @@ -1260,6 +1266,7 @@ 7275F9C11B5F1F2900B1D19E /* SUFileManager.h in Headers */, 767B61AC1972D488004E0C3C /* SUGuidedPackageInstaller.h in Headers */, 61EF67590E25C5B400F754E0 /* SUHost.h in Headers */, + 729924731DF3478A00DBCDF5 /* SUUpdateValidator.h in Headers */, 723B25301CEAB3A600909873 /* bscommon.h in Headers */, 618FA5010DAE88B40026945C /* SUInstaller.h in Headers */, 55C14F06136EF6DB00649790 /* SULog.h in Headers */, @@ -1815,6 +1822,7 @@ 61EF67560E25B58D00F754E0 /* SUHost.m in Sources */, 618FA5020DAE88B40026945C /* SUInstaller.m in Sources */, 55C14F07136EF6DB00649790 /* SULog.m in Sources */, + 729924741DF3478A00DBCDF5 /* SUUpdateValidator.m in Sources */, 723B252D1CEAB3A600909873 /* bscommon.c in Sources */, 726F2CE61BC9C33D001971A4 /* SUOperatingSystem.m in Sources */, 618FA5230DAE8E8A0026945C /* SUPackageInstaller.m in Sources */, diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index 321f6801..0c714d03 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -10,16 +10,14 @@ #import "SUHost.h" #import "SUOperatingSystem.h" -#import "SUDSAVerifier.h" -#import "SUInstaller.h" #import "SUStandardVersionComparator.h" #import "SUUnarchiver.h" #import "SUConstants.h" #import "SULog.h" #import "SUBinaryDeltaCommon.h" -#import "SUCodeSigningVerifier.h" #import "SUUpdater_Private.h" #import "SUFileManager.h" +#import "SUUpdateValidator.h" @interface SUBasicUpdateDriver () @@ -31,7 +29,7 @@ @property (copy) NSString *tempDir; @property (copy) NSString *relaunchPath; -@property (nonatomic) BOOL validatedDsaSignatureBeforeUnarchiving; +@property (nonatomic) SUUpdateValidator *updateValidator; @end @@ -45,7 +43,7 @@ @synthesize tempDir; @synthesize relaunchPath; -@synthesize validatedDsaSignatureBeforeUnarchiving = _validatedDsaSignatureBeforeUnarchiving; +@synthesize updateValidator = _updateValidator; - (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)aHost { @@ -278,73 +276,6 @@ [self.download setDestination:self.downloadPath allowOverwrite:YES]; } -/** - * If the update is a bundle, then it must meet any one of: - * - * * old and new DSA public keys are the same and valid (it allows change of Code Signing identity), or - * - * * old and new Code Signing identity are the same and valid - * - */ -- (BOOL)validateUpdateForHost:(SUHost *)host downloadedToPath:(NSString *)downloadedPath newBundleURL:(NSURL *)newBundleURL DSASignature:(NSString *)DSASignature -{ - NSBundle *newBundle = [NSBundle bundleWithURL:newBundleURL]; - if (newBundle == nil) { - SULog(@"No suitable bundle is found in the update. The update will be rejected."); - return NO; - } - - NSString *publicDSAKey = host.publicDSAKey; - - SUHost *newHost = [[SUHost alloc] initWithBundle:newBundle]; - NSString *newPublicDSAKey = newHost.publicDSAKey; - - // Downgrade in DSA security should not be possible - if (publicDSAKey != nil && newPublicDSAKey == nil) { - SULog(@"A public DSA key is found in the old bundle but no public DSA key is found in the new update. For security reasons, the update will be rejected."); - return NO; - } - - BOOL dsaKeysMatch = (publicDSAKey == nil || newPublicDSAKey == nil) ? NO : [publicDSAKey isEqualToString:newPublicDSAKey]; - - // If the new DSA key differs from the old, then this check is not a security measure, because the new key is not trusted. - // In that case, the check ensures that the app author has correctly used DSA keys, so that the app will be updateable in the next version. - // However if the new and old DSA keys are the same, then this is a security measure. - if (newPublicDSAKey != nil) { - if (![SUDSAVerifier validatePath:downloadedPath withEncodedDSASignature:DSASignature withPublicDSAKey:newPublicDSAKey]) { - SULog(@"DSA signature validation failed. The update has a public DSA key and is signed with a DSA key, but the %@ doesn't match the signature. The update will be rejected.", - dsaKeysMatch ? @"public key" : @"new public key shipped with the update"); - return NO; - } - } - BOOL updateIsCodeSigned = [SUCodeSigningVerifier bundleAtURLIsCodeSigned:newHost.bundle.bundleURL]; - - if (dsaKeysMatch) { - NSError *error = nil; - if (updateIsCodeSigned && ![SUCodeSigningVerifier codeSignatureIsValidAtBundleURL:newHost.bundle.bundleURL error:&error]) { - SULog(@"The update archive has a valid DSA signature, but the app is also signed with Code Signing, which is corrupted: %@. The update will be rejected.", error); - return NO; - } - } else { - BOOL hostIsCodeSigned = [SUCodeSigningVerifier bundleAtURLIsCodeSigned:host.bundle.bundleURL]; - - NSString *dsaStatus = newPublicDSAKey ? @"has a new DSA key that doesn't match the previous one" : (publicDSAKey ? @"removes the DSA key" : @"isn't signed with a DSA key"); - if (!hostIsCodeSigned || !updateIsCodeSigned) { - NSString *acsStatus = !hostIsCodeSigned ? @"old app hasn't been signed with app Code Signing" : @"new app isn't signed with app Code Signing"; - SULog(@"The update archive %@, and the %@. At least one method of signature verification must be valid. The update will be rejected.", dsaStatus, acsStatus); - return NO; - } - - NSError *error = nil; - if (![SUCodeSigningVerifier codeSignatureAtBundleURL:host.bundle.bundleURL matchesSignatureAtBundleURL:newHost.bundle.bundleURL error:&error]) { - SULog(@"The update archive %@, and the app is signed with a new Code Signing identity that doesn't match code signing of the original app: %@. At least one method of signature verification must be valid. The update will be rejected.", dsaStatus, error); - return NO; - } - } - - return YES; -} - - (void)downloadDidFinish:(NSURLDownload *)__unused d { assert(self.updateItem); @@ -390,28 +321,15 @@ BOOL success; if (!unarchiver) { SULog(@"Error: No valid unarchiver for %@!", self.downloadPath); + success = NO; - } else if ([[unarchiver class] unsafeIfArchiveIsNotValidated]) { - // Currently just binary delta updates require validation before unarchiving - - NSString *publicDSAKey = self.host.publicDSAKey; - NSString *dsaSignature = self.updateItem.DSASignature; - - if (publicDSAKey == nil) { - SULog(@"Failed to validate update before unarchiving because no DSA key was found"); - success = NO; - } else if (dsaSignature == nil) { - SULog(@"Failed to validate update before unarchiving because no DSA signature was found"); - success = NO; - } else if (![SUDSAVerifier validatePath:self.downloadPath withEncodedDSASignature:dsaSignature withPublicDSAKey:publicDSAKey]) { - SULog(@"DSA signature validation before unarchiving failed for update %@", self.downloadPath); - success = NO; - } else { - success = YES; - self.validatedDsaSignatureBeforeUnarchiving = YES; - } } else { - success = YES; + // Currently unsafe archives are the only case where we can prevalidate before extraction, but that could change in the future + BOOL needsPrevalidation = [[unarchiver class] unsafeIfArchiveIsNotValidated]; + + self.updateValidator = [[SUUpdateValidator alloc] initWithDownloadPath:self.downloadPath dsaSignature:self.updateItem.DSASignature host:self.host performingPrevalidation:needsPrevalidation]; + + success = self.updateValidator.canValidate; } if (!success) { @@ -424,9 +342,6 @@ - (void)failedToApplyDeltaUpdate { - // Clear this flag if we decide to do another full extraction - self.validatedDsaSignatureBeforeUnarchiving = NO; - // When a delta update fails to apply we fall back on updating via a full install. self.updateItem = self.nonDeltaUpdateItem; self.nonDeltaUpdateItem = nil; @@ -443,6 +358,9 @@ - (void)unarchiverDidFail:(SUUnarchiver *)__unused ua { + // No longer needed + self.updateValidator = nil; + if ([self.updateItem isDeltaUpdate]) { [self failedToApplyDeltaUpdate]; return; @@ -485,51 +403,9 @@ - (void)installWithToolAndRelaunch:(BOOL)relaunch displayingUserInterface:(BOOL)showUI { assert(self.updateItem); + assert(self.updateValidator); - NSString *DSASignature = self.updateItem.DSASignature; - NSString *publicDSAKey = self.host.publicDSAKey; - - BOOL validationCheckSuccess; - BOOL isPackage = NO; - - // install source could point to a new bundle or a package - NSString *installSource = [SUInstaller installSourcePathInUpdateFolder:self.tempDir forHost:self.host isPackage:&isPackage isGuided:NULL]; - if (installSource == nil) { - SULog(@"No suitable install is found in the update. The update will be rejected."); - validationCheckSuccess = NO; - } else { - NSURL *installSourceURL = [NSURL fileURLWithPath:installSource]; - - if (!self.validatedDsaSignatureBeforeUnarchiving) { - // Check to see if we have a package or bundle to validate - if (isPackage) { - // For package type updates, all we do is check if the DSA signature is valid - validationCheckSuccess = [SUDSAVerifier validatePath:self.downloadPath withEncodedDSASignature:DSASignature withPublicDSAKey:publicDSAKey]; - if (!validationCheckSuccess) { - SULog(@"DSA signature validation of the package failed. The update contains an installer package, and valid DSA signatures are mandatory for all installer packages. The update will be rejected. Sign the installer with a valid DSA key or use an .app bundle update instead."); - } - } else { - // For application bundle updates, we check both the DSA and Apple code signing signatures - validationCheckSuccess = [self validateUpdateForHost:self.host downloadedToPath:self.downloadPath newBundleURL:installSourceURL DSASignature:DSASignature]; - } - } else if (isPackage) { - // We shouldn't get here because we don't validate packages before extracting them currently - SULog(@"Error: not expecting to find package after being required to validate update before extraction"); - validationCheckSuccess = NO; - } else { - // Because we already validated the DSA signature, this is just a consistency check to see - // if the developer signed their application properly with their Apple ID - // Currently, this case only gets hit for binary delta updates - NSError *error = nil; - if ([SUCodeSigningVerifier bundleAtURLIsCodeSigned:installSourceURL] && ![SUCodeSigningVerifier codeSignatureIsValidAtBundleURL:installSourceURL error:&error]) { - SULog(@"Failed to validate apple code sign signature on bundle after archive validation with error: %@", error); - validationCheckSuccess = NO; - } else { - validationCheckSuccess = YES; - } - } - } - + BOOL validationCheckSuccess = [self.updateValidator validateWithUpdateDirectory:self.tempDir]; if (!validationCheckSuccess) { NSDictionary *userInfo = @{ NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred while extracting the archive. Please try again later.", nil), diff --git a/Sparkle/SUUpdateValidator.h b/Sparkle/SUUpdateValidator.h new file mode 100644 index 00000000..0a5f14c6 --- /dev/null +++ b/Sparkle/SUUpdateValidator.h @@ -0,0 +1,25 @@ +// +// SUUpdateValidator.h +// Sparkle +// +// Created by Mayur Pawashe on 12/3/16. +// Copyright © 2016 Sparkle Project. All rights reserved. +// + +#import + +@class SUHost; + +@interface SUUpdateValidator : NSObject + +// Pass YES to performingPrevalidation if archive validation must be done immediately, before extraction +- (instancetype)initWithDownloadPath:(NSString *)downloadPath dsaSignature:(NSString *)dsaSignature host:(SUHost *)host performingPrevalidation:(BOOL)performingPrevalidation; + +// Indicates whether we can perform (post) validation later +@property (nonatomic, readonly) BOOL canValidate; + +// precondition: validation must be possible (see -canValidate) +// This is "post" validation, after an archive has been extracted +- (BOOL)validateWithUpdateDirectory:(NSString *)updateDirectory; + +@end diff --git a/Sparkle/SUUpdateValidator.m b/Sparkle/SUUpdateValidator.m new file mode 100644 index 00000000..71727e89 --- /dev/null +++ b/Sparkle/SUUpdateValidator.m @@ -0,0 +1,192 @@ +// +// SUUpdateValidator.m +// Sparkle +// +// Created by Mayur Pawashe on 12/3/16. +// Copyright © 2016 Sparkle Project. All rights reserved. +// + +#import "SUUpdateValidator.h" +#import "SUDSAVerifier.h" +#import "SUCodeSigningVerifier.h" +#import "SUInstaller.h" +#import "SUHost.h" +#import "SULog.h" + +@interface SUUpdateValidator () + +@property (nonatomic, readonly) SUHost *host; +@property (nonatomic, readonly) BOOL prevalidatedDsaSignature; +@property (nonatomic, readonly) NSString *dsaSignature; +@property (nonatomic, readonly) NSString *downloadPath; + +@end + +@implementation SUUpdateValidator + +@synthesize host = _host; +@synthesize canValidate = _canValidate; +@synthesize prevalidatedDsaSignature = _prevalidatedDsaSignature; +@synthesize dsaSignature = _dsaSignature; +@synthesize downloadPath = _downloadPath; + +- (instancetype)initWithDownloadPath:(NSString *)downloadPath dsaSignature:(NSString *)dsaSignature host:(SUHost *)host performingPrevalidation:(BOOL)performingPrevalidation +{ + self = [super init]; + if (self != nil) { + BOOL canValidate; + BOOL prevalidatedDsaSignature; + if (performingPrevalidation) { + NSString *publicDSAKey = host.publicDSAKey; + + if (publicDSAKey == nil) { + prevalidatedDsaSignature = NO; + SULog(@"Failed to validate update before unarchiving because no DSA key was found"); + } else if (dsaSignature == nil) { + prevalidatedDsaSignature = NO; + SULog(@"Failed to validate update before unarchiving because no DSA signature was found"); + } else { + prevalidatedDsaSignature = [SUDSAVerifier validatePath:downloadPath withEncodedDSASignature:dsaSignature withPublicDSAKey:publicDSAKey]; + if (!prevalidatedDsaSignature) { + SULog(@"DSA signature validation before unarchiving failed for update %@", downloadPath); + } + } + + canValidate = prevalidatedDsaSignature; + } else { + prevalidatedDsaSignature = NO; + canValidate = YES; + } + + _canValidate = canValidate; + _prevalidatedDsaSignature = prevalidatedDsaSignature; + _downloadPath = [downloadPath copy]; + _dsaSignature = [dsaSignature copy]; + _host = host; + } + return self; +} + +- (BOOL)validateWithUpdateDirectory:(NSString *)updateDirectory +{ + assert(self.canValidate); + + NSString *DSASignature = self.dsaSignature; + NSString *publicDSAKey = self.host.publicDSAKey; + NSString *downloadPath = self.downloadPath; + SUHost *host = self.host; + + BOOL prevalidatedDsaSignature = self.prevalidatedDsaSignature; + + BOOL validationCheckSuccess; + BOOL isPackage = NO; + + // install source could point to a new bundle or a package + NSString *installSource = [SUInstaller installSourcePathInUpdateFolder:updateDirectory forHost:host isPackage:&isPackage isGuided:NULL]; + if (installSource == nil) { + SULog(@"No suitable install is found in the update. The update will be rejected."); + validationCheckSuccess = NO; + } else { + NSURL *installSourceURL = [NSURL fileURLWithPath:installSource]; + + if (!prevalidatedDsaSignature) { + // Check to see if we have a package or bundle to validate + if (isPackage) { + // For package type updates, all we do is check if the DSA signature is valid + validationCheckSuccess = [SUDSAVerifier validatePath:downloadPath withEncodedDSASignature:DSASignature withPublicDSAKey:publicDSAKey]; + if (!validationCheckSuccess) { + SULog(@"DSA signature validation of the package failed. The update contains an installer package, and valid DSA signatures are mandatory for all installer packages. The update will be rejected. Sign the installer with a valid DSA key or use an .app bundle update instead."); + } + } else { + // For application bundle updates, we check both the DSA and Apple code signing signatures + validationCheckSuccess = [self validateUpdateForHost:host downloadedToPath:downloadPath newBundleURL:installSourceURL DSASignature:DSASignature]; + } + } else if (isPackage) { + // We shouldn't get here because we don't validate packages before extracting them currently + SULog(@"Error: not expecting to find package after being required to validate update before extraction"); + validationCheckSuccess = NO; + } else { + // Because we already validated the DSA signature, this is just a consistency check to see + // if the developer signed their application properly with their Apple ID + // Currently, this case only gets hit for binary delta updates + NSError *error = nil; + if ([SUCodeSigningVerifier bundleAtURLIsCodeSigned:installSourceURL] && ![SUCodeSigningVerifier codeSignatureIsValidAtBundleURL:installSourceURL error:&error]) { + SULog(@"Failed to validate apple code sign signature on bundle after archive validation with error: %@", error); + validationCheckSuccess = NO; + } else { + validationCheckSuccess = YES; + } + } + } + + return validationCheckSuccess; +} + +/** + * If the update is a bundle, then it must meet any one of: + * + * * old and new DSA public keys are the same and valid (it allows change of Code Signing identity), or + * + * * old and new Code Signing identity are the same and valid + * + */ +- (BOOL)validateUpdateForHost:(SUHost *)host downloadedToPath:(NSString *)downloadedPath newBundleURL:(NSURL *)newBundleURL DSASignature:(NSString *)DSASignature +{ + NSBundle *newBundle = [NSBundle bundleWithURL:newBundleURL]; + if (newBundle == nil) { + SULog(@"No suitable bundle is found in the update. The update will be rejected."); + return NO; + } + + NSString *publicDSAKey = host.publicDSAKey; + + SUHost *newHost = [[SUHost alloc] initWithBundle:newBundle]; + NSString *newPublicDSAKey = newHost.publicDSAKey; + + // Downgrade in DSA security should not be possible + if (publicDSAKey != nil && newPublicDSAKey == nil) { + SULog(@"A public DSA key is found in the old bundle but no public DSA key is found in the new update. For security reasons, the update will be rejected."); + return NO; + } + + BOOL dsaKeysMatch = (publicDSAKey == nil || newPublicDSAKey == nil) ? NO : [publicDSAKey isEqualToString:newPublicDSAKey]; + + // If the new DSA key differs from the old, then this check is not a security measure, because the new key is not trusted. + // In that case, the check ensures that the app author has correctly used DSA keys, so that the app will be updateable in the next version. + // However if the new and old DSA keys are the same, then this is a security measure. + if (newPublicDSAKey != nil) { + if (![SUDSAVerifier validatePath:downloadedPath withEncodedDSASignature:DSASignature withPublicDSAKey:newPublicDSAKey]) { + SULog(@"DSA signature validation failed. The update has a public DSA key and is signed with a DSA key, but the %@ doesn't match the signature. The update will be rejected.", + dsaKeysMatch ? @"public key" : @"new public key shipped with the update"); + return NO; + } + } + BOOL updateIsCodeSigned = [SUCodeSigningVerifier bundleAtURLIsCodeSigned:newHost.bundle.bundleURL]; + + if (dsaKeysMatch) { + NSError *error = nil; + if (updateIsCodeSigned && ![SUCodeSigningVerifier codeSignatureIsValidAtBundleURL:newHost.bundle.bundleURL error:&error]) { + SULog(@"The update archive has a valid DSA signature, but the app is also signed with Code Signing, which is corrupted: %@. The update will be rejected.", error); + return NO; + } + } else { + BOOL hostIsCodeSigned = [SUCodeSigningVerifier bundleAtURLIsCodeSigned:host.bundle.bundleURL]; + + NSString *dsaStatus = newPublicDSAKey ? @"has a new DSA key that doesn't match the previous one" : (publicDSAKey ? @"removes the DSA key" : @"isn't signed with a DSA key"); + if (!hostIsCodeSigned || !updateIsCodeSigned) { + NSString *acsStatus = !hostIsCodeSigned ? @"old app hasn't been signed with app Code Signing" : @"new app isn't signed with app Code Signing"; + SULog(@"The update archive %@, and the %@. At least one method of signature verification must be valid. The update will be rejected.", dsaStatus, acsStatus); + return NO; + } + + NSError *error = nil; + if (![SUCodeSigningVerifier codeSignatureAtBundleURL:host.bundle.bundleURL matchesSignatureAtBundleURL:newHost.bundle.bundleURL error:&error]) { + SULog(@"The update archive %@, and the app is signed with a new Code Signing identity that doesn't match code signing of the original app: %@. At least one method of signature verification must be valid. The update will be rejected.", dsaStatus, error); + return NO; + } + } + + return YES; +} + +@end From 49781561f3b093d36217ca44f4a21e110d2d4cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesin=CC=81ski?= Date: Thu, 1 Dec 2016 21:07:23 +0000 Subject: [PATCH 6/9] Cocoapods fudge --- Sparkle.podspec | 1 + 1 file changed, 1 insertion(+) diff --git a/Sparkle.podspec b/Sparkle.podspec index 54460cf3..a606433d 100644 --- a/Sparkle.podspec +++ b/Sparkle.podspec @@ -20,6 +20,7 @@ Pod::Spec.new do |s| s.platform = :osx, '10.7' s.source = { :http => "https://github.com/sparkle-project/Sparkle/releases/download/#{s.version}/Sparkle-#{s.version}.tar.bz2" } + s.source_files = 'Sparkle.framework/Versions/A/Headers/*.h' s.public_header_files = 'Sparkle.framework/Versions/A/Headers/*.h' s.vendored_frameworks = 'Sparkle.framework' From f47115d81f4a59fe988442cdcf5c6fd4ad1017d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesin=CC=81ski?= Date: Sun, 4 Dec 2016 12:14:24 +0000 Subject: [PATCH 7/9] Version bump --- Configurations/ConfigCommon.xcconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig index 97db40e7..0824aaeb 100644 --- a/Configurations/ConfigCommon.xcconfig +++ b/Configurations/ConfigCommon.xcconfig @@ -17,7 +17,7 @@ SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME = 0 SPARKLE_VERSION_MAJOR = 1 SPARKLE_VERSION_MINOR = 15 -SPARKLE_VERSION_PATCH = 0 +SPARKLE_VERSION_PATCH = 1 SPARKLE_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH) CURRENT_PROJECT_VERSION = $(SPARKLE_VERSION) From 1e4f126f7ed176bd543c3ebb23906254731a8d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesin=CC=81ski?= Date: Sun, 4 Dec 2016 12:18:01 +0000 Subject: [PATCH 8/9] Podspec version bump --- Sparkle.podspec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sparkle.podspec b/Sparkle.podspec index a606433d..882746a6 100644 --- a/Sparkle.podspec +++ b/Sparkle.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Sparkle" - s.version = "1.15.0" + s.version = "1.15.1" s.summary = "A software update framework for macOS" s.description = "Sparkle is an easy-to-use software update framework for Cocoa developers." s.homepage = "http://sparkle-project.org" @@ -11,11 +11,11 @@ Pod::Spec.new do |s| :file => 'LICENSE' } s.authors = { - 'Andy Matuschak' => 'andy@andymatuschak.org', - 'Kornel Lesiński' => 'pornel@pornel.net', - 'C.W. Betts' => 'computers57@hotmail.com', - 'Jake Petroules' => 'jake.petroules@petroules.com', 'Mayur Pawashe' => 'zorgiepoo@gmail.com', + 'Kornel Lesiński' => 'pornel@pornel.net', + 'Jake Petroules' => 'jake.petroules@petroules.com', + 'C.W. Betts' => 'computers57@hotmail.com', + 'Andy Matuschak' => 'andy@andymatuschak.org', } s.platform = :osx, '10.7' From 945968a0ef19fb9ea87a0864468a67890ee233d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesin=CC=81ski?= Date: Sun, 4 Dec 2016 12:19:25 +0000 Subject: [PATCH 9/9] Reminder --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f27e6e8c..2aa20aa9 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ release: xcodebuild -scheme Distribution -configuration Release -derivedDataPath "$(BUILDDIR)" build open -R "$(BUILDDIR)/Build/Products/Release/Sparkle-"*.tar.bz2 cat Sparkle.podspec - @echo "Don't forget to update CocoaPods!" + @echo "Don't forget to update CocoaPods! pod trunk push" build: xcodebuild clean build