mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-05 05:51:42 +00:00
Refuse to parse ph:// URLs if iOS < 8 for safety
This commit is contained in:
parent
d5a6ad2123
commit
304ec9b543
@ -8,6 +8,7 @@
|
||||
|
||||
#import "ASPhotosFrameworkImageRequest.h"
|
||||
#import "ASBaseDefines.h"
|
||||
#import "ASAvailability.h"
|
||||
|
||||
NSString *const ASPhotosURLScheme = @"ph";
|
||||
|
||||
@ -100,8 +101,8 @@ static NSString *const _ASPhotosURLQueryKeyCropHeight = @"crop_h";
|
||||
|
||||
+ (ASPhotosFrameworkImageRequest *)requestWithURL:(NSURL *)url
|
||||
{
|
||||
// not a photos URL
|
||||
if (![url.scheme isEqualToString:ASPhotosURLScheme]) {
|
||||
// not a photos URL or iOS < 8
|
||||
if (![url.scheme isEqualToString:ASPhotosURLScheme] || !AS_AT_LEAST_IOS8) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user