M1-audit: public /token/ endpoint matches short codes and leaks invitee email #94

Closed
opened 2026-11-07 08:40:58 +01:00 by amiryahaya · 1 comment
Owner

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 == token clause.

Part of M1 closure audit #84.

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 == token` clause. Part of M1 closure audit #84.
Author
Owner

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.

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.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
primatekuntech/failsulit#94
No description provided.