From 391c8d533213fcc66cd7e60b736969d5fd951ae5 Mon Sep 17 00:00:00 2001 From: arch Date: Sat, 15 May 2021 21:38:28 +0200 Subject: fix #56 totp with space --- src/bin/rbw/commands.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/rbw/commands.rs b/src/bin/rbw/commands.rs index ee767c7..c1f9291 100644 --- a/src/bin/rbw/commands.rs +++ b/src/bin/rbw/commands.rs @@ -1494,7 +1494,7 @@ fn parse_totp_secret(secret: &str) -> anyhow::Result> { } else { secret.to_string() }; - base32::decode(base32::Alphabet::RFC4648 { padding: false }, &secret_str) + base32::decode(base32::Alphabet::RFC4648 { padding: false }, &secret_str.replace(" ", "")) .ok_or_else(|| anyhow::anyhow!("totp secret was not valid base32")) } -- cgit v1.2.3