From 383138be3692d1b1bdbc1ef7ad3469fbf8c35cf9 Mon Sep 17 00:00:00 2001 From: Jens Utbult Date: Mon, 8 Jan 2024 11:00:40 +0100 Subject: [PATCH] Fixes issue where secrets with spaces in them didn't work properly. --- .../Authentication/AddCredential/AddCredentialController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Authenticator/UI/Authentication/AddCredential/AddCredentialController.swift b/Authenticator/UI/Authentication/AddCredential/AddCredentialController.swift index 78f543f0..c199f00c 100644 --- a/Authenticator/UI/Authentication/AddCredential/AddCredentialController.swift +++ b/Authenticator/UI/Authentication/AddCredential/AddCredentialController.swift @@ -126,7 +126,7 @@ class AddCredentialController: UITableViewController { do { switch mode { case .manual: - let secret = NSData.ykf_data(withBase32String: self.secretManualText.text ?? "") ?? Data() + let secret = NSData.ykf_data(withBase32String: self.secretManualText.text?.replacingOccurrences(of: " ", with: "") ?? "") ?? Data() let credentialType = YKFOATHCredentialType.typeFromString(advancedSettings[0][typeIndex]) let algorithm = YKFOATHCredentialAlgorithm.algorithmFromString(advancedSettings[1][algorithmIndex])