mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-28 05:14:34 +00:00
Ignore file URL scheme in custom allowed URL schemes (#2410)
This commit is contained in:
1 file changed
+6
-1
Vendored
+6
-1
@@ -329,7 +329,12 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE
|
||||
if ([(NSObject *)hostAllowedURLSchemes isKindOfClass:[NSArray class]]) {
|
||||
for (id urlScheme in (NSArray *)hostAllowedURLSchemes) {
|
||||
if ([(NSObject *)urlScheme isKindOfClass:[NSString class]]) {
|
||||
[allowedSchemes addObject:[(NSString *)urlScheme lowercaseString]];
|
||||
NSString *allowedURLScheme = [(NSString *)urlScheme lowercaseString];
|
||||
if (![allowedURLScheme isEqualToString:@"file"]) {
|
||||
[allowedSchemes addObject:allowedURLScheme];
|
||||
} else {
|
||||
SULog(SULogLevelError, @"Error: Found 'file' scheme in %@. Ignoring because this scheme is unsafe.", SUAllowedURLSchemesKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user