Compare commits

...
3 changed files with 7 additions and 7 deletions

No files matched your search

+1 -1
View File
@@ -161,4 +161,4 @@ GCC_WARN_UNUSED_PARAMETER = YES
GCC_WARN_UNUSED_VARIABLE = YES
// 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-auto-import -Wno-gnu-zero-variadic-macro-arguments -Wno-format-non-iso -Wno-direct-ivar-access -Werror=undef
WARNING_CFLAGS = -Wall -Weverything -Wno-unused-macros -Wno-gnu-statement-expression -Wno-auto-import -Wno-gnu-zero-variadic-macro-arguments -Wno-format-non-iso -Wno-direct-ivar-access -Wno-declaration-after-statement -Werror=undef
-2
View File
@@ -62,7 +62,6 @@ static SUSigningInputStatus decode(NSString *str, NSData * __strong *outData) {
NSData *data = nil;
_ed25519SignatureStatus = decode(maybeEd25519, &data);
if (data) {
assert(64 == sizeof(_ed25519_signature));
if ([data length] == sizeof(_ed25519_signature)) {
[data getBytes:_ed25519_signature length:sizeof(_ed25519_signature)];
} else {
@@ -163,7 +162,6 @@ static BOOL decodeStatus(NSCoder *decoder, NSString *key, SUSigningInputStatus *
NSData *ed = nil;
_ed25519PubKeyStatus = decode(maybeEd25519, &ed);
if (ed) {
assert(32 == sizeof(_ed25519_public_key));
if ([ed length] == sizeof(_ed25519_public_key)) {
[ed getBytes:_ed25519_public_key length:sizeof(_ed25519_public_key)];
} else {
+6 -4
View File
@@ -322,17 +322,19 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE
BOOL javaScriptEnabled = [_host boolForInfoDictionaryKey:SUEnableJavaScriptKey];
#if DOWNLOADER_XPC_SERVICE_EMBEDDED
// WKWebView has a bug where it won't work in loading local HTML content in sandboxed apps that do not have an outgoing network entitlement
// FB6993802: https://twitter.com/sindresorhus/status/1160577243929878528 | https://github.com/feedback-assistant/reports/issues/1
// If the developer is using the downloader XPC service, they are very most likely are a) sandboxed b) do not use outgoing network entitlement.
// In this case, fall back to legacy WebKit view.
// (In theory it is possible for a non-sandboxed app or sandboxed app with outgoing network entitlement to use the XPC service, it's just pretty unlikely. And falling back to a legacy web view would not be too harmful in those cases).
BOOL useWKWebView = !SPUXPCServiceIsEnabled(SUEnableDownloaderServiceKey);
if (useWKWebView) {
_releaseNotesView = [[SUWKWebView alloc] initWithColorStyleSheetLocation:colorStyleURL fontFamily:defaultFontFamily fontPointSize:defaultFontSize javaScriptEnabled:javaScriptEnabled];
} else {
if (!useWKWebView) {
_releaseNotesView = [[SULegacyWebView alloc] initWithColorStyleSheetLocation:colorStyleURL fontFamily:defaultFontFamily fontPointSize:defaultFontSize javaScriptEnabled:javaScriptEnabled];
} else
#endif
{
_releaseNotesView = [[SUWKWebView alloc] initWithColorStyleSheetLocation:colorStyleURL fontFamily:defaultFontFamily fontPointSize:defaultFontSize javaScriptEnabled:javaScriptEnabled];
}
}