mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-27 05:04:27 +00:00
Fixing Bug #338324: "Unsigned updates delivered over https fail"
Silly boolean logic error.
This commit is contained in:
1 parent
afe8afc41f
commit
799b00211d
1 file changed
+3
-2
@@ -167,9 +167,10 @@
|
||||
{
|
||||
// New in Sparkle 1.5: we're now checking signatures on all non-secure downloads, where "secure" is defined as both the appcast and the download being transmitted over SSL.
|
||||
NSURL *downloadURL = [[d request] URL];
|
||||
if (!([[downloadURL scheme] isEqualToString:@"https"] && [[appcastURL scheme] isEqualToString:@"https"]) || !([downloadURL isFileURL] && [appcastURL isFileURL]) || [host publicDSAKey])
|
||||
if (!(([[downloadURL scheme] isEqualToString:@"https"] && [[appcastURL scheme] isEqualToString:@"https"]) ||
|
||||
([downloadURL isFileURL] && [appcastURL isFileURL])))
|
||||
{
|
||||
if (![SUDSAVerifier validatePath:downloadPath withEncodedDSASignature:[updateItem DSASignature] withPublicDSAKey:[host publicDSAKey]])
|
||||
if (![host publicDSAKey] || ![SUDSAVerifier validatePath:downloadPath withEncodedDSASignature:[updateItem DSASignature] withPublicDSAKey:[host publicDSAKey]])
|
||||
{
|
||||
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUSignatureError userInfo:[NSDictionary dictionaryWithObject:@"The update is improperly signed." forKey:NSLocalizedDescriptionKey]]];
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user