[Bug]: can not put 0 (zero) into TOTP 2FA secret string
Bug description
I tried on Android and Linux: both fail, just ignore zero silently in that input field.
Typing or pasting zeros into other fields works fine.
I dont know if some standardization is behind this, declaring 0 a invalid character?
But I can tell for sure that I have 2FA Secrets with zeros in in them ... and the all fail to import. Worse actually: since its ignored silently, they import fine and generate a code as well. But that code does not work then! Cause the zero(s) are needed to produce the correct hash.
Expected outcome
TOTP 2FA secrets with zeros should just be accepted and this lead to working codes.
Steps to reproduce
Put a 0 (zero) into the 2FA secret input field and observe its not possible.
Error log
No error, zeros get ignored silently.
App version
None
Submission checklist
- [x] I have specified the problem in the issue title
- [x] I have provided a verbose description of the problem
Hi @cvx35isl !
Apologies, at the moment, Passy only supports base32 characters (uppercase letters and numbers 2-7) in its TOTP fields, not unlike many simple authenticator apps.
This is both intended design and a slight oversight - I will add warning notifications instead of silent filtering.
While the default option will remain base32 to avoid confusion when it comes to lowercase letters, I hope to implement optional support for base64 in the form of a dropdown menu.
Thank you very much for your report. I have failed to consider base64 secrets in my implementation, for which I once again apologise.
oh, dont apologize: I am happy you made a program where the user remains the proprietor of his own data on his own computer!