doy / rbw

unofficial bitwarden cli
https://git.tozt.net/rbw
Other
573 stars 82 forks source link

new version of 'rbw' struggles with lower case ([a-z]) TOTP secrets and ones with padding - trailing equal signs ('=') #191

Open rjc opened 5 days ago

rjc commented 5 days ago

Hello,

As per the title/subject, the latest version of rbw stopped generating TOTP codes for secrets comprised of lower case letters ([a-z]) as well as ones with padding - trailing equal signs (=). It now gives this error instead:

rbw code: totp secret was not valid base32

Whilst Base32 does actually use upper case letters, some online providers generate the TOTP secrets in lower case, namely Google, so changing all secrets from lower to upper case, feel sub-optimal, not to mention convincing said providers to change the way they generate TOTP secrets ;^)

As to padding - a TOTP shares secret with ==== padding is valid.

BTW, everything worked fine, at least, up to rbw version 1.10.2, and it would be great to restore the old behaviour.

Regards,

rjc

rjc commented 4 days ago

I hadn't tested it yet but, it looks like #189 fixes the former.