Project data was readable by any signed-in user #8

Closed
opened 2026-10-14 23:16:17 -04:00 by vmanne-poc · 0 comments
Owner

Problem: routes under /projects/:projectId/... (contacts, senders, templates, campaigns, forms, reports) only checked that a user was logged in, not that they belonged to the project. Because self-registration was open, anyone could register and read or change another project's data.

Fix: ProjectAccessGuard runs after JWT auth on every project-scoped route and requires a ProjectMember row. Non-members get 404 so the API doesn't confirm a project exists. POSTAK_DISABLE_REGISTRATION=true can also turn off public sign-up.

Tests: guard unit tests; e2e test "hides a project from users who are not members".

Fixed in v0.7.0.

**Problem:** routes under `/projects/:projectId/...` (contacts, senders, templates, campaigns, forms, reports) only checked that a user was logged in, not that they belonged to the project. Because self-registration was open, anyone could register and read or change another project's data. **Fix:** `ProjectAccessGuard` runs after JWT auth on every project-scoped route and requires a `ProjectMember` row. Non-members get 404 so the API doesn't confirm a project exists. `POSTAK_DISABLE_REGISTRATION=true` can also turn off public sign-up. **Tests:** guard unit tests; e2e test "hides a project from users who are not members". Fixed in `v0.7.0`.
vmanne-poc 2026-10-14 23:16:17 -04:00
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
vmanne-poc/Postak#8
No description provided.