470
you are viewing a single comment's thread
view the rest of the comments
[-] TheFogan@programming.dev 5 points 4 days ago

Right but not only is it a security weakness, but it's also not helpful to the user. Point is the username probably exists in the system.

Say I went to a website to register TheFogan, but TheFogan already exists, so I created TheFogan2.

3 years later I go back to the website, try and log in with username: "TheFogan" password: "Hunter2", and it tells me "your username is right but your password is wrong". But in reality I have the right password for my account, but the site would just think I have the wrong password for the guy who beat me to my account.

So yeah agreed the primary reason for it is security, IE a fully user focused, while having bad security practices would be, a "if the username exists in the system, report "Username and password don't match", if the username doesn't exist report "There is no user by this name in the system". My point is the site only can know if they have a user by that username, not whether that is MY username.

this post was submitted on 10 Apr 2026
470 points (90.8% liked)

Programmer Humor

30937 readers
466 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS