From 2117e30ec45843b9412ddd80c54720e284ac5e87 Mon Sep 17 00:00:00 2001 From: Alexander Ilin Date: Sun, 2 Jan 2022 02:53:14 +0100 Subject: [PATCH] totp: ignore spaces in the key string --- extra/totp/totp.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/totp/totp.factor b/extra/totp/totp.factor index ab5c2efee4..e0d7590b60 100644 --- a/extra/totp/totp.factor +++ b/extra/totp/totp.factor @@ -29,5 +29,5 @@ PRIVATE> [ number>string ] dip [ CHAR: 0 pad-head ] keep tail* ; : totp ( key -- string ) - dup string? [ >upper base32> ] when + dup string? [ [ CHAR: space = ] reject >upper base32> ] when now timestamp>count swap totp-hash get totp* totp-digits get digits ; -- 2.34.1