Skip to content

Commit 383138b

Browse files
committed
Fixes issue where secrets with spaces in them didn't work properly.
1 parent fad8fa8 commit 383138b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Authenticator/UI/Authentication/AddCredential/AddCredentialController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class AddCredentialController: UITableViewController {
126126
do {
127127
switch mode {
128128
case .manual:
129-
let secret = NSData.ykf_data(withBase32String: self.secretManualText.text ?? "") ?? Data()
129+
let secret = NSData.ykf_data(withBase32String: self.secretManualText.text?.replacingOccurrences(of: " ", with: "") ?? "") ?? Data()
130130
let credentialType = YKFOATHCredentialType.typeFromString(advancedSettings[0][typeIndex])
131131
let algorithm = YKFOATHCredentialAlgorithm.algorithmFromString(advancedSettings[1][algorithmIndex])
132132

0 commit comments

Comments
 (0)