Exempt the WCTP gateway routes from CSRF verification #23

Merged
Patrick merged 2 commits from fix/wctp-csrf-exempt into main 2026-11-11 12:55:26 -05:00
Owner

POST /wctp and the carrier webhooks under /wctp/... are registered in
routes/web.php, so they run through VerifyCsrfToken, but none was on its
except list. Enterprise Hosts and carriers cannot send a CSRF token, so
production answered them 419. Both '/wctp' and '/wctp/*' are listed:
the wildcard alone does not match the bare Enterprise Host endpoint.

Laravel skips CSRF verification under unit tests, which is why every WCTP
test passed. The new test checks each registered WCTP POST route against
the middleware's own except-list matching instead.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

POST /wctp and the carrier webhooks under /wctp/... are registered in routes/web.php, so they run through VerifyCsrfToken, but none was on its except list. Enterprise Hosts and carriers cannot send a CSRF token, so production answered them 419. Both '/wctp' and '/wctp/*' are listed: the wildcard alone does not match the bare Enterprise Host endpoint. Laravel skips CSRF verification under unit tests, which is why every WCTP test passed. The new test checks each registered WCTP POST route against the middleware's own except-list matching instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exempt the WCTP gateway routes from CSRF verification
Some checks failed
CI / Test suite (pull_request) Has been cancelled
CI / Migrations (MySQL) (pull_request) Has been cancelled
CI / Migrations (PostgreSQL) (pull_request) Has been cancelled
CI / Static analysis (pull_request) Has been cancelled
CI / Asset build (pull_request) Has been cancelled
6e1f03e38e
POST /wctp and the carrier webhooks under /wctp/... are registered in
routes/web.php, so they run through VerifyCsrfToken, but none was on its
except list. Enterprise Hosts and carriers cannot send a CSRF token, so
production answered them 419. Both '/wctp' and '/wctp/*' are listed:
the wildcard alone does not match the bare Enterprise Host endpoint.

Laravel skips CSRF verification under unit tests, which is why every WCTP
test passed. The new test checks each registered WCTP POST route against
the middleware's own except-list matching instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge branch 'main' into fix/wctp-csrf-exempt
All checks were successful
CI / Migrations (PostgreSQL) (pull_request) Successful in 27s
CI / Migrations (MySQL) (pull_request) Successful in 1m0s
CI / Static analysis (pull_request) Successful in 58s
CI / Asset build (pull_request) Successful in 1m7s
CI / Test suite (pull_request) Successful in 13m55s
bf3ec7fe54
Patrick deleted branch fix/wctp-csrf-exempt 2026-11-11 12:55:26 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
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
calltheory/mission-control!23
No description provided.