Bug: Password reset confirm returns HTTP 200 for invalid tokens #138
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api#138
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Bug
Lineage
plan-wkq→ Phase 11 (Girls Tryout — March 24)Discovered during UX testing of password reset flow (basketball-api #132)
Repo
forgejo_admin/basketball-api+forgejo_admin/westside-appWhat Broke
POST /api/password-reset/confirmreturns HTTP 200 with{"message":"Invalid or expired reset token."}for invalid/expired tokens. The frontend checks status code only, sees 200, and shows "Your password has been updated" — even though nothing happened. A parent with an expired link thinks they reset their password, tries to sign in, and fails.Repro Steps
/reset-password?token=any-invalid-tokenExpected Behavior
Environment
Acceptance Criteria
POST /api/password-reset/confirmreturns HTTP 400 for invalid/expired/used tokens/forgot-passwordto request a new oneFile Targets
basketball-api:
src/basketball_api/routes/password_reset.py— change invalid token response from 200 to 400westside-app:
src/routes/reset-password/+page.svelte— checkres.okbefore showing success, show error state on failureConstraints
/requestendpoint (no user enumeration)/confirmendpoint — invalid tokens are not a security enumeration riskChecklist
Related