fix: do not return specific errors on unauthenticated endpoints to avoid account enumeration - #671
Conversation
…o avoid account enumeration
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
PR Type
Bug fix
Description
Prevent account enumeration in password reset endpoint
Return success response for all invalid email scenarios
Update error handling to mask user existence information
Modify tests to expect consistent success responses
Diagram Walkthrough
File Walkthrough
send_password_reset_email.go
Implement anti-enumeration logic in password resetgo/controller/send_password_reset_email.go
errorspackage for error type checkingsend_password_reset_email_test.go
Update tests for anti-enumeration behaviorgo/controller/send_password_reset_email_test.go