← PHP / Laravel · Contents

PHP-026 / Beginner

Revealing account existence through login or password-recovery responses

A07:2021 Identification and Authentication Failures · CWE-204 Observable Response Discrepancy

Why is this a problem?

A message such as "Email not found" permits enumeration of registered members.

How to fix it

php
// Same message: "If the information is correct, an email has been sent."
return back()->with('status', __('passwords.sent'));

Further reading