M1-audit: public /token/ endpoint matches short codes and leaks invitee email #94
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#94
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?
GetInvitationByToken.cs:31-33 queries
Token == token || ShortCode == token— the OR defeats the endpoint's own 'full token only' comment. The /code/{code} endpoint was deliberately built to serve NO email for short codes; /token/ now serves the invitee's Email to anyone holding the short code (which travels in emails/admin lists).Fix: drop the
|| i.ShortCode == tokenclause.Part of M1 closure audit #84.
Fixed in PR #116 (squash-merged as
b0945c9). Dropped the ShortCode OR clause — /token/ matches FULL tokens only and never serves the invitee email to short-code holders; /code/{code} keeps the PII-free preview. Guard tests pin both contracts.