From e52951535a34c648564645404d9b11850d7973a7 Mon Sep 17 00:00:00 2001 From: Jens Utbult Date: Tue, 12 Nov 2024 10:48:22 +0100 Subject: [PATCH] Do not encode slashes in json for webauthn --- .../Shared/Sessions/FIDO2/WebAuthN/YKFWebAuthnClientData.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YubiKit/YubiKit/Connections/Shared/Sessions/FIDO2/WebAuthN/YKFWebAuthnClientData.m b/YubiKit/YubiKit/Connections/Shared/Sessions/FIDO2/WebAuthN/YKFWebAuthnClientData.m index 82b564b8..841fb4b9 100644 --- a/YubiKit/YubiKit/Connections/Shared/Sessions/FIDO2/WebAuthN/YKFWebAuthnClientData.m +++ b/YubiKit/YubiKit/Connections/Shared/Sessions/FIDO2/WebAuthN/YKFWebAuthnClientData.m @@ -44,7 +44,7 @@ - (NSData *)jsonData { @"challenge": websafeChallenge, @"origin": self.origin}; NSError *error = nil; - NSData *result = [NSJSONSerialization dataWithJSONObject:jsonDictionary options:0 error:&error]; + NSData *result = [NSJSONSerialization dataWithJSONObject:jsonDictionary options:NSJSONWritingWithoutEscapingSlashes error:&error]; YKFAssertReturnValue(!error && result, @"Could not serialize the clientDataJson.", nil); return result;