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

Quiz: Passwords and Authentication · Question 9 of 10

Why should the login error be the same for "no such email" and "wrong password"?

Why should the login error be the same for "no such email" and "wrong password"?

  1. A.To make the code shorter
  2. B.To stop account enumeration, where attackers learn which emails are registered
  3. C.Because databases cannot tell them apart
  4. D.To speed up the login page
Answer & explanation

Correct answer: To stop account enumeration, where attackers learn which emails are registered

Use one message such as "Incorrect email or password".

Can you get the rest right without peeking?

Take the timed Quiz: Passwords and Authentication quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →