From b3ea3c67537d88d1baab17f9b35bc5a83f88dc8c Mon Sep 17 00:00:00 2001 From: Kasper Weibel Nielsen-Refs Date: Mon, 27 May 2024 12:23:59 +0200 Subject: [PATCH] Fix crash in SFSafariViewController --- .../PrebidMobileRendering/Prebid/PBMCore/PBMSafariVCOpener.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PrebidMobile/PrebidMobileRendering/Prebid/PBMCore/PBMSafariVCOpener.m b/PrebidMobile/PrebidMobileRendering/Prebid/PBMCore/PBMSafariVCOpener.m index ed88ec0c2..409effa9a 100644 --- a/PrebidMobile/PrebidMobileRendering/Prebid/PBMCore/PBMSafariVCOpener.m +++ b/PrebidMobile/PrebidMobileRendering/Prebid/PBMCore/PBMSafariVCOpener.m @@ -112,6 +112,11 @@ - (BOOL)openURL:(NSURL *)url onClickthroughExitBlock:(nullable PBMVoidBlock)onCl return NO; } + if (!([strURLscheme isEqualToString:@"http"] || [strURLscheme isEqualToString:@"https"])) { + PBMLogError(@"Attempting to open url [%@] in SFSafariViewController. SFSafariViewController only supports initial URLs with http:// or https:// schemes.", url); + return NO; + } + //Show clickthrough browser return [self openClickthroughWithURL:url