🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Password Storage Lab: all 10 questions

Quiz: Password Storage Lab · Question 4 of 10

Why does the login function return "Incorrect username or password" in both failure cases?

Why does the login function return "Incorrect username or password" in both failure cases?

  1. A.To save code
  2. B.So attackers cannot learn which usernames exist
  3. C.Because the database cannot tell the difference
  4. D.It is required by PBKDF2
Answer & explanation

Correct answer: So attackers cannot learn which usernames exist

Different messages allow account enumeration.

Can you get the rest right without peeking?

Take the timed Quiz: Password Storage Lab quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →