446
you are viewing a single comment's thread
view the rest of the comments
[-] rizzothesmall@sh.itjust.works 135 points 1 day ago* (last edited 1 day ago)

Being able to determine if a username is valid without a valid password is a security flaw

Even something as simple as taking longer to validate the password when the username is a valid one can also lead to user enumeration

[-] cactusupyourbutt@lemmy.world 10 points 1 day ago

I keep hearing that, yet the websites will gladly tell you that the username is taken when trying to register

[-] howrar@lemmy.ca 1 points 1 day ago* (last edited 1 day ago)

That's easy to do. You just check that the username exists. If someone enters a wrong username/password pair, you can still check that the username exists, but how do you know that the user intended to log in with that username? You would also have to check every other username to see if the password matches, and that can't be done with a simple search because you need to compute a different hash for each user you check. Then if the username exists and the password also happens to match someone else's password, then what do you report? Should you even report it? Because doing so reveals that someone had that specific password, and if the list of usernames is publicly available (which they often are, or could become public through a leak of some sort), then you can brute force over a small set of usernames to match them up.

load more comments (2 replies)
load more comments (6 replies)
this post was submitted on 10 Apr 2026
446 points (91.0% liked)

Programmer Humor

30885 readers
1667 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