Keyspace-cloud / android

Official Android client for keyspace.cloud. A beautiful and secure password manager.
https://keyspace.cloud
GNU General Public License v3.0
136 stars 9 forks source link

Totp length validation #50

Closed 0x4f53 closed 1 year ago

0x4f53 commented 1 year ago

:recycle: Current situation

TOTPs with extremely short-length secrets (1-5 characters) are displayed inconsistently throughout the app.

:bulb: Proposed solution

Save a login containing a authenticator secret only if the secret length >= 6 characters. Display a discreet error in the text box otherwise.

Ideally, users copy and paste or scan a QR code to save this information, so the error accounts for an edge case where the user needs to type their secret into the authenticator secret text box.

📚 Release Notes

📝 Testing

  1. Try saving a login where the authenticator secret is in range 1..5.
  2. Tap the tick mark and observe the error icon in the authenticator secret text box.