mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-22 04:30:47 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dda155c7d3 | ||
|
|
fd629728d8 | ||
|
|
709968403d | ||
|
|
4911fa9cce | ||
|
|
4cfba2ada4 |
No files matched your search
@@ -1,3 +1,9 @@
|
||||
# 2.3.2
|
||||
|
||||
* Fix potential crash during download if appcast item includes invalid enclosure URL (#2317) (Zorg)
|
||||
* Add delegate method to hide showing version history option (#2303) (Zorg)
|
||||
* Finnish localization grammar fixes (#2311) (Lauri-Matti Parppei)
|
||||
|
||||
# 2.3.1
|
||||
|
||||
* Fix update permission alert title text overlapping with question text in some languages (#2284) (Zorg)
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"1.27.1": "https://github.com/sparkle-project/Sparkle/releases/download/1.27.1/Sparkle-1.27.1.tar.xz", "2.0.0-beta.6": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0-beta.6/Sparkle-2.0.0-beta.6.tar.xz", "2.0.0-rc.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0-rc.1/Sparkle-2.0.0-rc.1.tar.xz", "2.0.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0/Sparkle-2.0.0.tar.xz", "2.1.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0-beta.1/Sparkle-2.1.0-beta.1.tar.xz", "2.1.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0-beta.2/Sparkle-2.1.0-beta.2.tar.xz", "2.1.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0/Sparkle-2.1.0.tar.xz", "2.2.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0-beta.1/Sparkle-2.2.0-beta.1.tar.xz", "2.2.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0-beta.2/Sparkle-2.2.0-beta.2.tar.xz", "2.2.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0/Sparkle-2.2.0.tar.xz", "2.2.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.1/Sparkle-2.2.1.tar.xz", "2.2.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.2/Sparkle-2.2.2.tar.xz", "2.3.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0-beta.1/Sparkle-2.3.0-beta.1.tar.xz", "2.3.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0-beta.2/Sparkle-2.3.0-beta.2.tar.xz", "2.3.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0/Sparkle-2.3.0.tar.xz", "2.3.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.1/Sparkle-2.3.1.tar.xz"}
|
||||
{"1.27.1": "https://github.com/sparkle-project/Sparkle/releases/download/1.27.1/Sparkle-1.27.1.tar.xz", "2.0.0-beta.6": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0-beta.6/Sparkle-2.0.0-beta.6.tar.xz", "2.0.0-rc.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0-rc.1/Sparkle-2.0.0-rc.1.tar.xz", "2.0.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.0.0/Sparkle-2.0.0.tar.xz", "2.1.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0-beta.1/Sparkle-2.1.0-beta.1.tar.xz", "2.1.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0-beta.2/Sparkle-2.1.0-beta.2.tar.xz", "2.1.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0/Sparkle-2.1.0.tar.xz", "2.2.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0-beta.1/Sparkle-2.2.0-beta.1.tar.xz", "2.2.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0-beta.2/Sparkle-2.2.0-beta.2.tar.xz", "2.2.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.0/Sparkle-2.2.0.tar.xz", "2.2.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.1/Sparkle-2.2.1.tar.xz", "2.2.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.2.2/Sparkle-2.2.2.tar.xz", "2.3.0-beta.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0-beta.1/Sparkle-2.3.0-beta.1.tar.xz", "2.3.0-beta.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0-beta.2/Sparkle-2.3.0-beta.2.tar.xz", "2.3.0": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.0/Sparkle-2.3.0.tar.xz", "2.3.1": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.1/Sparkle-2.3.1.tar.xz", "2.3.2": "https://github.com/sparkle-project/Sparkle/releases/download/2.3.2/Sparkle-2.3.2.tar.xz"}
|
||||
@@ -43,12 +43,12 @@ SPARKLE_ICON_NAME = AppIcon
|
||||
// These variables must have a space after the '=' too
|
||||
SPARKLE_VERSION_MAJOR = 2
|
||||
SPARKLE_VERSION_MINOR = 3
|
||||
SPARKLE_VERSION_PATCH = 1
|
||||
SPARKLE_VERSION_PATCH = 2
|
||||
|
||||
// This should be in SemVer format or empty, ie. "-beta.1"
|
||||
// These variables must have a space after the '=' too
|
||||
SPARKLE_VERSION_SUFFIX =
|
||||
CURRENT_PROJECT_VERSION = 2021.1
|
||||
CURRENT_PROJECT_VERSION = 2021.2
|
||||
|
||||
MARKETING_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)$(SPARKLE_VERSION_SUFFIX)
|
||||
ALWAYS_SEARCH_USER_PATHS = NO
|
||||
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
import PackageDescription
|
||||
|
||||
// Version is technically not required here, SPM doesn't check
|
||||
let version = "2.3.1"
|
||||
let version = "2.3.2"
|
||||
// Tag is required to point towards the right asset. SPM requires the tag to follow semantic versioning to be able to resolve it.
|
||||
let tag = "2.3.1"
|
||||
let checksum = "ebfcd6834be40faf9b6ca7409db14f1e7f4efe37e724bc93457be425b9347fbb"
|
||||
let tag = "2.3.2"
|
||||
let checksum = "cc8042a914d562d0903d488cbd5e6d1c0d3e8735574ad80cc1d3b2901f791b1d"
|
||||
let url = "https://github.com/sparkle-project/Sparkle/releases/download/\(tag)/Sparkle-for-Swift-Package-Manager.zip"
|
||||
|
||||
let package = Package(
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "Sparkle"
|
||||
s.version = "2.3.1"
|
||||
s.version = "2.3.2"
|
||||
s.summary = "A software update framework for macOS"
|
||||
s.description = "Sparkle is an easy-to-use software update framework for macOS."
|
||||
s.homepage = "https://sparkle-project.org"
|
||||
|
||||
@@ -186,6 +186,7 @@
|
||||
723ABFC5259D4CB300BDB4FA /* SUWKWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 723ABFC3259D4CB300BDB4FA /* SUWKWebView.m */; };
|
||||
723AC010259DBDAA00BDB4FA /* SUWebViewCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 723AC00E259DBDAA00BDB4FA /* SUWebViewCommon.h */; };
|
||||
723AC011259DBDAA00BDB4FA /* SUWebViewCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 723AC00F259DBDAA00BDB4FA /* SUWebViewCommon.m */; };
|
||||
723AD12F29922B5F006BB02F /* test-dangerous-link.xml in Resources */ = {isa = PBXBuildFile; fileRef = 723AD12E29922B5F006BB02F /* test-dangerous-link.xml */; };
|
||||
723B5DA71CF7AB0100365F95 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 723B5DA01CF7AB0100365F95 /* main.m */; };
|
||||
723B5DA91CF7AB0100365F95 /* SPUDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 723B5DA31CF7AB0100365F95 /* SPUDownloader.m */; };
|
||||
723B5DAA1CF7AB6A00365F95 /* SPUDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 723B5DA31CF7AB0100365F95 /* SPUDownloader.m */; };
|
||||
@@ -1171,6 +1172,7 @@
|
||||
723ABFC3259D4CB300BDB4FA /* SUWKWebView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SUWKWebView.m; sourceTree = "<group>"; };
|
||||
723AC00E259DBDAA00BDB4FA /* SUWebViewCommon.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SUWebViewCommon.h; sourceTree = "<group>"; };
|
||||
723AC00F259DBDAA00BDB4FA /* SUWebViewCommon.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SUWebViewCommon.m; sourceTree = "<group>"; };
|
||||
723AD12E29922B5F006BB02F /* test-dangerous-link.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "test-dangerous-link.xml"; sourceTree = "<group>"; };
|
||||
723B5D9F1CF7AB0100365F95 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Downloader/Info.plist; sourceTree = SOURCE_ROOT; };
|
||||
723B5DA01CF7AB0100365F95 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Downloader/main.m; sourceTree = SOURCE_ROOT; };
|
||||
723B5DA21CF7AB0100365F95 /* SPUDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SPUDownloader.h; path = Downloader/SPUDownloader.h; sourceTree = SOURCE_ROOT; };
|
||||
@@ -1830,6 +1832,7 @@
|
||||
FA30773C24CBC295007BA37D /* testlocalizedreleasenotesappcast.xml */,
|
||||
5A5DD41B249F0F4B0045EB3E /* test-relative-urls.xml */,
|
||||
729F7EAB27366353004592DC /* test-links.xml */,
|
||||
723AD12E29922B5F006BB02F /* test-dangerous-link.xml */,
|
||||
5A5DD40324958AFF0045EB3E /* SUUpdateValidatorTest */,
|
||||
);
|
||||
path = Resources;
|
||||
@@ -3097,6 +3100,7 @@
|
||||
files = (
|
||||
725B3A82263FBF0C0041AB8E /* testappcast_minimumAutoupdateVersion.xml in Resources */,
|
||||
14958C6E19AEBC950061B14F /* signed-test-file.txt in Resources */,
|
||||
723AD12F29922B5F006BB02F /* test-dangerous-link.xml in Resources */,
|
||||
723EDC3F26885A8E000BCBA4 /* testappcast_channels.xml in Resources */,
|
||||
720DC50427A51A6500DFF3EC /* testappcast_minimumAutoupdateVersionSkipping.xml in Resources */,
|
||||
72AC6B2E1B9B218C00F62325 /* SparkleTestCodeSignApp.dmg in Resources */,
|
||||
|
||||
Vendored
+26
-21
@@ -580,31 +580,36 @@ static const NSTimeInterval SUScheduledUpdateIdleEventLeewayInterval = DEBUG ? 3
|
||||
case SPUNoUpdateFoundReasonOnLatestVersion:
|
||||
case SPUNoUpdateFoundReasonOnNewerThanLatestVersion: {
|
||||
// Show the user the past version history if available
|
||||
NSString *localizedButtonTitle = SULocalizedString(@"Version History", nil);
|
||||
|
||||
// Check if the delegate implements a Version History action
|
||||
// Check if the delegate allows showing the Version History
|
||||
id <SPUStandardUserDriverDelegate> delegate = self.delegate;
|
||||
BOOL shouldShowVersionHistory = (![delegate respondsToSelector:@selector(standardUserDriverShouldShowVersionHistoryForAppcastItem:)] || [delegate standardUserDriverShouldShowVersionHistoryForAppcastItem:latestAppcastItem]);
|
||||
|
||||
if ([delegate respondsToSelector:@selector(standardUserDriverShowVersionHistoryForAppcastItem:)]) {
|
||||
[alert addButtonWithTitle:localizedButtonTitle];
|
||||
if (shouldShowVersionHistory) {
|
||||
NSString *localizedButtonTitle = SULocalizedString(@"Version History", nil);
|
||||
|
||||
secondaryAction = ^{
|
||||
[delegate standardUserDriverShowVersionHistoryForAppcastItem:latestAppcastItem];
|
||||
};
|
||||
} else if (latestAppcastItem.fullReleaseNotesURL != nil) {
|
||||
// Open the full release notes URL if informed
|
||||
[alert addButtonWithTitle:localizedButtonTitle];
|
||||
|
||||
secondaryAction = ^{
|
||||
[[NSWorkspace sharedWorkspace] openURL:(NSURL * _Nonnull)latestAppcastItem.fullReleaseNotesURL];
|
||||
};
|
||||
} else if (latestAppcastItem.releaseNotesURL != nil) {
|
||||
// Fall back to opening the release notes URL
|
||||
[alert addButtonWithTitle:localizedButtonTitle];
|
||||
|
||||
secondaryAction = ^{
|
||||
[[NSWorkspace sharedWorkspace] openURL:(NSURL * _Nonnull)latestAppcastItem.releaseNotesURL];
|
||||
};
|
||||
// Check if the delegate implements its own Version History action
|
||||
if ([delegate respondsToSelector:@selector(standardUserDriverShowVersionHistoryForAppcastItem:)]) {
|
||||
[alert addButtonWithTitle:localizedButtonTitle];
|
||||
|
||||
secondaryAction = ^{
|
||||
[delegate standardUserDriverShowVersionHistoryForAppcastItem:latestAppcastItem];
|
||||
};
|
||||
} else if (latestAppcastItem.fullReleaseNotesURL != nil) {
|
||||
// Open the full release notes URL if informed
|
||||
[alert addButtonWithTitle:localizedButtonTitle];
|
||||
|
||||
secondaryAction = ^{
|
||||
[[NSWorkspace sharedWorkspace] openURL:(NSURL * _Nonnull)latestAppcastItem.fullReleaseNotesURL];
|
||||
};
|
||||
} else if (latestAppcastItem.releaseNotesURL != nil) {
|
||||
// Fall back to opening the release notes URL
|
||||
[alert addButtonWithTitle:localizedButtonTitle];
|
||||
|
||||
secondaryAction = ^{
|
||||
[[NSWorkspace sharedWorkspace] openURL:(NSURL * _Nonnull)latestAppcastItem.releaseNotesURL];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
+13
@@ -42,6 +42,19 @@ SU_EXPORT @protocol SPUStandardUserDriverDelegate <NSObject>
|
||||
*/
|
||||
- (_Nullable id <SUVersionDisplay>)standardUserDriverRequestsVersionDisplayer;
|
||||
|
||||
/**
|
||||
Decides whether or not the standard user driver should provide an option to show full release notes to the user.
|
||||
|
||||
When a user checks for new updates and no new update is found, Sparkle by default will offer to show the application's version history to the user
|
||||
by providing a "Version History" button in the no new update available alert.
|
||||
|
||||
If this delegate method is implemented to return `NO`, then Sparkle will not provide an option to show full release notes to the user.
|
||||
|
||||
@param item The appcast item corresponding to the latest version available.
|
||||
@return @c YES to allow Sparkle to show full release notes to the user, otherwise @c NO to disallow this.
|
||||
*/
|
||||
- (BOOL)standardUserDriverShouldShowVersionHistoryForAppcastItem:(SUAppcastItem *)item;
|
||||
|
||||
/**
|
||||
Handles showing the full release notes to the user.
|
||||
|
||||
|
||||
Vendored
+4
-2
@@ -472,8 +472,10 @@ static NSString *SUAppcastItemDeltaFromSparkleLocalesKey = @"SUAppcastItemDeltaF
|
||||
if ([fileURL.scheme caseInsensitiveCompare:@"http"] == NSOrderedSame || [fileURL.scheme caseInsensitiveCompare:@"https"] == NSOrderedSame) {
|
||||
_fileURL = fileURL;
|
||||
} else {
|
||||
SULog(SULogLevelError, @"File URLs must have a http or https URL scheme.");
|
||||
_fileURL = nil;
|
||||
if (error) {
|
||||
*error = @"File URLs must have a http or https URL scheme";
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
if (enclosure) {
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
"cCJ-V0-aTi.title" = "Älä tarkista";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Check for updates automatically?"; ObjectID = "gmh-T4-BO0"; */
|
||||
"gmh-T4-BO0.title" = "Tarkista päivityksiä käynnistyksen yhteydessä?";
|
||||
"gmh-T4-BO0.title" = "Tarkista päivitykset käynnistyksen yhteydessä?";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Include anonymous system profile"; ObjectID = "gz7-LM-gNf"; */
|
||||
"gz7-LM-gNf.title" = "Sisällytä nimetön järjestelmäprofiili";
|
||||
|
||||
Vendored
+8
-8
@@ -2,10 +2,10 @@
|
||||
"%@ %@ is currently the newest version available." = "%1$@ %2$@ on uusin saatavilla oleva versio.";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ on uusin saatavilla oleva versio.\n(You are currently running version %3$@.)";
|
||||
"%@ %@ is currently the newest version available.\n(You are currently running version %@.)" = "%1$@ %2$@ on uusin saatavilla oleva versio.\n(Asennettu versio on %3$@.)";
|
||||
|
||||
/* Description text for SUUpdateAlert when the update is downloadable. */
|
||||
"%@ %@ is now available—you have %@. Would you like to download it now?" = "%1$@ %2$@ on nyt saatavilla (sinulla on %3$@). Haluatko ladata sen nyt?";
|
||||
"%@ %@ is now available—you have %@. Would you like to download it now?" = "%1$@ %2$@ on nyt saatavilla (nykyinen versiosi on %3$@). Haluatko ladata päivityksen nyt?";
|
||||
|
||||
/* The download progress in units of bytes, e.g. 100 KB of 1,0 MB */
|
||||
"%@ of %@" = "%1$@ / %2$@";
|
||||
@@ -17,7 +17,7 @@
|
||||
"An error occurred in retrieving update information. Please try again later." = "Päivitystietojen haussa tapahtui virhe. Yritä myöhemmin uudelleen.";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"An error occurred while extracting the archive. Please try again later." = "Pakkauksen purkamisen yhteydessä tapahtui virhe. Yritä myöhemmin uudelleen.";
|
||||
"An error occurred while extracting the archive. Please try again later." = "Pakkauksen purkamisessa tapahtui virhe. Yritä myöhemmin uudelleen.";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Cancel" = "Kumoa";
|
||||
@@ -29,16 +29,16 @@
|
||||
"Checking for updates…" = "Tarkistetaan päivityksiä…";
|
||||
|
||||
/* Take care not to overflow the status window. */
|
||||
"Downloading update…" = "Haen päivitystä…";
|
||||
"Downloading update…" = "Haetaan päivitystä…";
|
||||
|
||||
/* Take care not to overflow the status window. */
|
||||
"Extracting update…" = "Puran päivitystä…";
|
||||
"Extracting update…" = "Puretaan päivitystä…";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Install and Relaunch" = "Asenna ja käynnistä ohjelma uudelleen";
|
||||
|
||||
/* Take care not to overflow the status window. */
|
||||
"Installing update…" = "Asennan päivityksen…";
|
||||
"Installing update…" = "Päivitys asennetaan…";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"OK" = "OK";
|
||||
@@ -47,10 +47,10 @@
|
||||
"Ready to Install" = "Valmiina asentamaan";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Update Error!" = "Virhe päivityksessä!";
|
||||
"Update Error!" = "Virhe päivityksessä";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Updating %@" = "Päivitän %@";
|
||||
"Updating %@" = "Päivitetään %@";
|
||||
|
||||
/* Status message shown when the user checks for updates but is already current or the feed doesn't contain any updates. */
|
||||
"You’re up-to-date!" = "Sinulla on viimeisin versio!";
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
|
||||
<channel>
|
||||
<title>For unit test only</title>
|
||||
<item>
|
||||
<title>Version 3.0</title>
|
||||
<pubDate>Sat, 26 Jul 2014 15:20:12 +0000</pubDate>
|
||||
<sparkle:releaseNotesLink>https://sparkle-project.org/notes/relnote-3.0.txt</sparkle:releaseNotesLink>
|
||||
<sparkle:fullReleaseNotesLink>https://sparkle-project.org/fullnotes.txt</sparkle:fullReleaseNotesLink>
|
||||
<link>https://sparkle-project.org</link>
|
||||
<enclosure url="https://sparkle-project.org/release-3.0.zip" sparkle:version="3.0" length="1346234" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.0</title>
|
||||
<pubDate>Sat, 26 Jul 2014 15:20:12 +0000</pubDate>
|
||||
<sparkle:releaseNotesLink>http://sparkle-project.org/notes/relnote-2.0.txt</sparkle:releaseNotesLink>
|
||||
<sparkle:fullReleaseNotesLink>http://sparkle-project.org/fullnotes.txt</sparkle:fullReleaseNotesLink>
|
||||
<link>http://sparkle-project.org</link>
|
||||
<enclosure url="http://sparkle-project.org/release-2.0.zip" sparkle:version="2.0" length="1346234" />
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 1.0</title>
|
||||
<pubDate>Sat, 26 Jul 2014 15:20:12 +0000</pubDate>
|
||||
<sparkle:releaseNotesLink>file://sparkle-project.org/notes/relnote-1.0.txt</sparkle:releaseNotesLink>
|
||||
<sparkle:fullReleaseNotesLink>file://sparkle-project.org/fullnotes.txt</sparkle:fullReleaseNotesLink>
|
||||
<link>file://sparkle-project.org</link>
|
||||
<enclosure url="file://sparkle-project.org/release-1.0.zip" sparkle:version="1.0" length="1346234" />
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
@@ -24,7 +24,7 @@
|
||||
<sparkle:releaseNotesLink>file://sparkle-project.org/notes/relnote-1.0.txt</sparkle:releaseNotesLink>
|
||||
<sparkle:fullReleaseNotesLink>file://sparkle-project.org/fullnotes.txt</sparkle:fullReleaseNotesLink>
|
||||
<link>file://sparkle-project.org</link>
|
||||
<enclosure url="file://sparkle-project.org/release-1.0.zip" sparkle:version="1.0" length="1346234" />
|
||||
<enclosure url="https://sparkle-project.org/release-1.0.zip" sparkle:version="1.0" length="1346234" />
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
@@ -935,7 +935,7 @@ class SUAppcastTest: XCTestCase {
|
||||
XCTAssertEqual(nil, items[2].releaseNotesURL?.absoluteString)
|
||||
XCTAssertEqual(nil, items[2].fullReleaseNotesURL?.absoluteString)
|
||||
XCTAssertEqual(nil, items[2].infoURL?.absoluteString)
|
||||
XCTAssertEqual(nil, items[2].fileURL?.absoluteString)
|
||||
XCTAssertEqual("https://sparkle-project.org/release-1.0.zip", items[2].fileURL?.absoluteString)
|
||||
|
||||
} catch let err as NSError {
|
||||
NSLog("%@", err)
|
||||
@@ -973,4 +973,21 @@ class SUAppcastTest: XCTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
func testDangerousLink() {
|
||||
let testFile = Bundle(for: SUAppcastTest.self).path(forResource: "test-dangerous-link", ofType: "xml")!
|
||||
let testData = NSData(contentsOfFile: testFile)!
|
||||
|
||||
do {
|
||||
let baseURL: URL? = nil
|
||||
|
||||
let stateResolver = SPUAppcastItemStateResolver(hostVersion: "1.0", applicationVersionComparator: SUStandardVersionComparator.default, standardVersionComparator: SUStandardVersionComparator.default)
|
||||
|
||||
let _ = try SUAppcast(xmlData: testData as Data, relativeTo: baseURL, stateResolver: stateResolver)
|
||||
|
||||
XCTFail("Appcast creation should fail when encountering dangerous link")
|
||||
} catch let err as NSError {
|
||||
NSLog("Expected error: %@", err)
|
||||
XCTAssertNotNil(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user