Signed-contract download endpoint is unauthenticated and enumerable #20

Open
opened 2026-07-19 22:17:39 -06:00 by jhodgkin · 0 comments
Owner

GET /api/bookings/:id/contract serves any signed contract by numeric id (kept as-is because n8n email links use it) — there's no auth check, so incrementing the id lets anyone pull another client's signed contract PDF.

Fix: replace with HMAC-signed URLs (?token=…, using SESSION_SECRET) and update the n8n workflow template that generates the email links accordingly.

Migrated from docs/BACKLOG-2026-07-16.md (S1).

`GET /api/bookings/:id/contract` serves any signed contract by numeric id (kept as-is because n8n email links use it) — there's no auth check, so incrementing the id lets anyone pull another client's signed contract PDF. **Fix:** replace with HMAC-signed URLs (`?token=…`, using `SESSION_SECRET`) and update the n8n workflow template that generates the email links accordingly. Migrated from `docs/BACKLOG-2026-07-16.md` (S1).
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jhodgkin/lisilou-portfolio#20