Skip to content

Commit 3f8ea68

Browse files
committed
Fix $63: Crash while checking credential status in some conditions
1 parent e04bca8 commit 3f8ea68

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/eudiWalletOidcIos/Service/CredentialRevocationUtil.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public class CredentialRevocationUtil {
5959
let (data, _) = try await URLSession.shared.data(for: request)
6060
let stringData = String.init(data: data, encoding: .utf8)
6161
let split = stringData?.split(separator: ".")
62+
guard split?.count ?? 0 > 1 else { return [] }
6263
let jsonString = "\(split?[1] ?? "")".decodeBase64() ?? ""
6364
let statusDict = UIApplicationUtils.shared.convertStringToDictionary(text: jsonString)
6465
let statusListDict = statusDict?["status_list"] as? [String: Any]

0 commit comments

Comments
 (0)