From 7ccb5228f05f65772f96aea5d0c6bc336ba1d096 Mon Sep 17 00:00:00 2001 From: Jens Utbult Date: Mon, 21 Oct 2024 09:31:43 +0200 Subject: [PATCH] Fixes OATH create credential regression bug where a ':' would be added to the account name if the optional issuer was not present. --- .../Connections/Shared/Sessions/OATH/YKFOATHCredentialUtils.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YubiKit/YubiKit/Connections/Shared/Sessions/OATH/YKFOATHCredentialUtils.m b/YubiKit/YubiKit/Connections/Shared/Sessions/OATH/YKFOATHCredentialUtils.m index 5ebdc25e..8f9d2a62 100644 --- a/YubiKit/YubiKit/Connections/Shared/Sessions/OATH/YKFOATHCredentialUtils.m +++ b/YubiKit/YubiKit/Connections/Shared/Sessions/OATH/YKFOATHCredentialUtils.m @@ -33,7 +33,7 @@ + (NSString *)keyFromAccountName:(NSString *)name issuer:(NSString *)issuer peri if (type == YKFOATHCredentialTypeTOTP && period != YKFOATHCredentialDefaultPeriod) { [accountId appendFormat:@"%ld/", (unsigned long)period]; } - if (issuer != nil) { + if (issuer != nil && issuer.length > 0) { [accountId appendFormat:@"%@:", issuer]; } [accountId appendString:name];