Audit(#66): PATCH /api/me writes an arbitrary unverified Email — squatting blocks real owner registration #103
Labels
No labels
epic
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
phase-7
phase-8
phase-9
priority/P0
priority/P1
priority/P2
type/backend
type/client
type/docs
type/ops
type/security
type/spike
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/failsulit#103
Loading…
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?
UpdateProfile.cs:38-46 lets any Active user (even pending/no-workspace via the /api/me allowed prefix) set
user.Emailto any unused string — no format check, no OTP proof, no uniqueness pre-check.Trigger: wallet user sets
email: boss@company.com→ the real owner's laterPOST /api/auth/email/registerfor that address 409s forever; recovery/OTP mail routes to the squatter's row. If the address is taken → unique-index violation surfaces as a 500 (existence oracle).Fix: drop Email from UpdateProfile (changes belong to the LinkEmail OTP flow), or apply format+uniqueness checks without ever marking verified.
M1.5 close audit (#66).