this post was submitted on 13 Mar 2024
1021 points (96.9% liked)

Memes

49816 readers
1215 users here now

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.

founded 6 years ago
MODERATORS
 

Brute force protection

@memes

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 131 points 1 year ago (4 children)

As a non programmer, is the joke that humans will retype their password assuming that they made a typo?

If so, sick indeed.

[–] [email protected] 106 points 1 year ago (1 children)

The guy coding made it so, on your first attempt, even if you answer correctly, it will tell you your login failed due to incorrect username or password, to joke about how it feels like you always get it wrong on the first try

[–] [email protected] 17 points 1 year ago* (last edited 1 year ago) (2 children)

The logic is bugging me, though. It should be if isFirstAttempt || !isPasswordCorrect

I understand the meme is trying to convey in spite of being correct to still return an error, but then it doesn't account for when the password is actually incorrect.

[–] [email protected] 48 points 1 year ago* (last edited 1 year ago)

That defeats the brute-force attack protection…

The idea is that brute-force attackers will only check each password once, while real users will likely assume they mistyped and retype the same password.

The code isn’t complete, and has nothing to do with actually incorrect passwords.

[–] [email protected] 17 points 1 year ago (1 children)

Like the other person said, it's not meant to always fail the first time you enter any password.

It is meant to fail the first time you enter the correct password.

[–] [email protected] 1 points 1 year ago

So it should be: if password == correct and first_success == true then { login failure; first_success = false }

Something like that.

[–] [email protected] 86 points 1 year ago

Yeah, hackers have automated tools and they will, of course, only try each password once.

[–] [email protected] 11 points 1 year ago

I would assume that I was being phished and the attacker wanted me to re-type the password to verify that it's correct.

[–] [email protected] 1 points 1 year ago