← All comics

Show my password

#166 2 images

Toby took Pip's advice and made the 'forgot password' page just show people their password. It showed anyone's password to anyone, starting with his own.

The mistake

The forgot-password page looks up the account by email address and displays the stored password. That only works because the passwords are stored in plaintext or with reversible encryption, and the page never checks that the person asking actually owns the inbox, so anyone who knows an email address can read that user's password. The "fix" of asking for the current password first makes the page useless to anyone who has really forgotten it, and the passwords are still stored in recoverable form. Passwords should be hashed with a slow, salted algorithm such as bcrypt or Argon2 so nobody can recover them. A reset should email a single-use, time-limited token that lets the user set a new password.

Share