mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Add more AppKit prevention guards
This commit is contained in:
1 parent
d8ce7cb48b
commit
fa2e857b4e
23 files changed
+92
No files matched your search
@@ -9,6 +9,10 @@
|
||||
#import "SPUInstallationInfo.h"
|
||||
#import "SUAppcastItem.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
static NSString *SUAppcastItemKey = @"SUAppcastItem";
|
||||
static NSString *SUCanSilentlyInstallKey = @"SUCanSilentlyInstall";
|
||||
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
#import "SUDSAVerifier.h"
|
||||
#import "SUCodeSigningVerifier.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
@implementation SPUInstallerValidation
|
||||
|
||||
+ (BOOL)validateBundleUpdateForHost:(SUHost *)host newBundlePath:(NSString *)newBundlePath archivePath:(NSString *)archivePath DSASignature:(NSString *)DSASignature
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
#import "SPUMessageTypes.h"
|
||||
#import "SUHost.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
NSString *SPUAppcastItemArchiveKey = @"SPUAppcastItemArchive";
|
||||
|
||||
// Tags added to the bundle identifier which is used as Mach service names
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AppInstaller.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
int main(int __unused argc, const char __unused *argv[])
|
||||
{
|
||||
@autoreleasepool
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
#import "SUInstallerConnection.h"
|
||||
#import "SPUSystemAuthorization.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
static NSString *SUInstallerConnectionKeepAliveReason = @"Installer Connection Keep Alive";
|
||||
|
||||
@interface SUInstallerConnection () <SUInstallerCommunicationProtocol>
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
|
||||
#import "SUXPCInstallerConnection.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
@interface SUXPCInstallerConnection ()
|
||||
|
||||
@property (nonatomic) NSXPCConnection *connection;
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
#import "SUInstallerConnection.h"
|
||||
#import "SUInstallerCommunicationProtocol.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
@interface ServiceDelegate : NSObject <NSXPCListenerDelegate>
|
||||
@end
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
#import "SUInstallerStatus.h"
|
||||
#import "SPUSystemAuthorization.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
@interface SUInstallerStatus ()
|
||||
|
||||
@property (nonatomic, copy) void (^invalidationBlock)(void);
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
|
||||
#import "SUXPCInstallerStatus.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
@interface SUXPCInstallerStatus ()
|
||||
|
||||
@property (nonatomic) NSXPCConnection *connection;
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "SUInstallerStatus.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
@interface ServiceDelegate : NSObject <NSXPCListenerDelegate>
|
||||
@end
|
||||
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
#import "SPUURLRequest.h"
|
||||
#import "SUErrors.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
static NSString *SUPersistentDownloadingReason = @"Downloading persistent file";
|
||||
|
||||
@interface SUPersistentDownloader () <NSURLDownloadDelegate>
|
||||
|
||||
Vendored
+4
@@ -8,6 +8,10 @@
|
||||
|
||||
#import "SPUDownloadData.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
static NSString *SPUDownloadDataKey = @"SPUDownloadData";
|
||||
static NSString *SPUDownloadTextEncodingKey = @"SPUDownloadTextEncoding";
|
||||
static NSString *SPUDownloadMIMETypeKey = @"SPUDownloadMIMEType";
|
||||
|
||||
Vendored
+4
@@ -9,6 +9,10 @@
|
||||
#import "SPULocalCacheDirectory.h"
|
||||
#import "SULog.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
static NSTimeInterval OLD_ITEM_DELETION_INTERVAL = 86400 * 10; // 10 days
|
||||
|
||||
@implementation SPULocalCacheDirectory
|
||||
|
||||
Vendored
+4
@@ -9,6 +9,10 @@
|
||||
#import "SPUSecureCoding.h"
|
||||
#import "SULog.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
static NSString *SURootObjectArchiveKey = @"SURootObjectArchive";
|
||||
|
||||
NSData * _Nullable SPUArchiveRootObjectSecurely(id<NSSecureCoding> rootObject)
|
||||
|
||||
Vendored
+4
@@ -10,6 +10,10 @@
|
||||
#import "SPUInstallationType.h"
|
||||
#import "SUFileManager.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
BOOL SPUNeedsSystemAuthorizationAccess(NSString *path, NSString *installationType)
|
||||
{
|
||||
BOOL needsAuthorization;
|
||||
|
||||
Vendored
+4
@@ -14,6 +14,10 @@
|
||||
#import "SPUDownloadData.h"
|
||||
#import "SUErrors.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
void SPUDownloadURLWithRequest(NSURLRequest * request, void (^completionBlock)(SPUDownloadData * _Nullable, NSError * _Nullable))
|
||||
{
|
||||
id<SUTemporaryDownloaderProtocol> downloader = nil;
|
||||
|
||||
Vendored
+4
@@ -8,6 +8,10 @@
|
||||
|
||||
#import "SPUURLRequest.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
static NSString *SPUURLRequestURLKey = @"SPUURLRequestURL";
|
||||
static NSString *SPUURLRequestCachePolicyKey = @"SPUURLRequestCachePolicy";
|
||||
static NSString *SPUURLRequestTimeoutIntervalKey = @"SPUURLRequestTimeoutInterval";
|
||||
|
||||
Vendored
+4
@@ -8,6 +8,10 @@
|
||||
|
||||
#import "SPUUpdaterTimer.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
@interface SPUUpdaterTimer ()
|
||||
|
||||
@property (nonatomic, readonly, weak) id<SPUUpdaterTimerDelegate> delegate;
|
||||
|
||||
Vendored
+4
@@ -8,6 +8,10 @@
|
||||
|
||||
#import "SPUXPCServiceInfo.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
BOOL SPUXPCServiceExists(NSString *bundleName)
|
||||
{
|
||||
NSBundle *xpcBundle = SPUXPCServiceBundle(bundleName);
|
||||
|
||||
Vendored
+4
@@ -18,6 +18,10 @@
|
||||
#import "SPUInstallationInfo.h"
|
||||
#import "SUDownloadedUpdate.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
@interface SUBasicUpdateDriver () <SUAppcastDriverDelegate>
|
||||
|
||||
@property (nonatomic, weak, readonly) id<SUBasicUpdateDriverDelegate> delegate;
|
||||
|
||||
Vendored
+4
@@ -8,6 +8,10 @@
|
||||
|
||||
#import "SUDownloadedUpdate.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
@implementation SUDownloadedUpdate
|
||||
|
||||
@synthesize updateItem = _updateItem;
|
||||
|
||||
Vendored
+4
@@ -15,6 +15,10 @@
|
||||
#import "SUXPCInstallerStatus.h"
|
||||
#import "SULog.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
// This timeout is if probing the installer takes too long
|
||||
// It should be at least more than 1 second since a probe can take around that much time
|
||||
#define PROBE_TIMEOUT 7
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
#import "SUErrors.h"
|
||||
#import "SUConstants.h"
|
||||
|
||||
#ifdef _APPKITDEFINES_H
|
||||
#error This is a "core" class and should NOT import AppKit
|
||||
#endif
|
||||
|
||||
@interface SUTemporaryDownloader () <NSURLDownloadDelegate>
|
||||
|
||||
@property (nonatomic, copy) void (^completionBlock)(SPUDownloadData * _Nullable downloadData, NSError * _Nullable error);
|
||||
|
||||
Reference in new issue
Block a user