From 44482c123f54f711f8a0affe7bd677de259af22f Mon Sep 17 00:00:00 2001 From: Arne Kepp Date: Thu, 28 Jan 2021 11:46:41 +0100 Subject: [PATCH] iOS CookieManager.getCookies - Check that URL has suffix of cookie domain --- ios/Classes/MyCookieManager.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Classes/MyCookieManager.swift b/ios/Classes/MyCookieManager.swift index 917ee1a4..8f20ec94 100755 --- a/ios/Classes/MyCookieManager.swift +++ b/ios/Classes/MyCookieManager.swift @@ -146,7 +146,7 @@ class MyCookieManager: NSObject, FlutterPlugin { if let urlHost = URL(string: url)?.host { MyCookieManager.httpCookieStore!.getAllCookies { (cookies) in for cookie in cookies { - if cookie.domain.contains(urlHost) { + if urlHost.hasSuffix(cookie.domain) { var sameSite: String? = nil if #available(iOS 13.0, *) { if let sameSiteValue = cookie.sameSitePolicy?.rawValue {