Skip to content

Fix: replace raw error messages with generic errors in auth routes#19

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
FuturMix:fix/auth-error-disclosure
Jun 15, 2026
Merged

Fix: replace raw error messages with generic errors in auth routes#19
ralyodio merged 1 commit into
profullstack:masterfrom
FuturMix:fix/auth-error-disclosure

Conversation

@FuturMix

Copy link
Copy Markdown
Contributor

Summary

Fixes #18

Auth endpoints leak internal Supabase error messages that can enable account enumeration and information disclosure.

Changes

  • apps/web/src/app/api/auth/signup/route.ts: Replace error.message with generic "Signup failed"
  • apps/web/src/app/api/auth/reset-password/route.ts: Replace with "Password reset request failed"
  • apps/web/src/app/api/auth/update-password/route.ts: Replace with "Password update failed"
  • All three: Add console.error() for server-side debugging

Test plan

  • Failed signup: returns generic "Signup failed" (not Supabase internals)
  • Failed password reset: returns generic error
  • Successful flows: unaffected (no error path triggered)

🤖 Generated with Claude Code

The signup, reset-password, and update-password endpoints return raw
Supabase error messages to the client. These can reveal internal details
like "User already registered" (enabling account enumeration), database
schema information, or rate limiting implementation details.

Replace error.message with generic errors and log the original message
server-side for debugging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ralyodio ralyodio merged commit 35a232b into profullstack:master Jun 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Auth endpoints leak internal error messages

2 participants