From f00e3a45c4521f7f4e69b53c31c8d73c28f3a536 Mon Sep 17 00:00:00 2001 From: Ullas-Aithal Date: Mon, 4 Nov 2019 18:27:03 -0600 Subject: [PATCH] #253 Remove whitespaces in secret when added manually --- .../org/shadowice/flocke/andotp/View/ManualEntryDialog.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/shadowice/flocke/andotp/View/ManualEntryDialog.java b/app/src/main/java/org/shadowice/flocke/andotp/View/ManualEntryDialog.java index 8e5025de..5c603e36 100644 --- a/app/src/main/java/org/shadowice/flocke/andotp/View/ManualEntryDialog.java +++ b/app/src/main/java/org/shadowice/flocke/andotp/View/ManualEntryDialog.java @@ -195,7 +195,8 @@ public class ManualEntryDialog { String issuer = issuerInput.getText().toString(); String label = labelInput.getText().toString(); - String secret = secretInput.getText().toString(); + //Replace spaces with empty characters + String secret = secretInput.getText().toString().replaceAll("\\s+",""); int digits = Integer.parseInt(digitsInput.getText().toString()); if (type == Entry.OTPType.TOTP || type == Entry.OTPType.STEAM) {