dorfteich/apps/api
Claude Fable 5 d32c8c3730
Some checks failed
CI / Lint, typecheck, test (pull_request) Failing after 1m51s
CI / Auth e2e pack (pull_request) Has been skipped
CI / Import/export fidelity gate (pull_request) Has been skipped
CI / Build container images (pull_request) Has been skipped
#189: make the CSRF origin check fail closed
A cookie-carrying mutation without Origin and Referer (or with an
unparsable one) is now rejected with 403 csrf_origin_mismatch instead
of passing unchecked. The exception for non-browser clients stays
structural: PAT/bearer requests carry no session cookie and never reach
the check, and a request that does carry the cookie is always checked.

The test harness injects the matching Origin (supertest simulates a
browser page of this instance) with an explicit suppression header for
the negative cases; the Playwright fixture contexts send the header on
their manual seeding calls; release-qa.sh pins APP_BASE_URL and sends
the matching Origin. Dedicated spec covers: missing headers 403,
mismatch 403, unparsable 403, match passes, GETs untouched, PAT
mutation without headers passes, cookie+bearer still checked.

Refs #189

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0168Ph5uBmHm8X28CSVpbpnJ
2026-07-30 09:34:44 +02:00
..
prisma #151: Mention-Benachrichtigungen über die Glocke 2026-07-20 01:25:16 +02:00
src #189: make the CSRF origin check fail closed 2026-07-30 09:34:44 +02:00
.swcrc Add NestJS API skeleton with config, logging, and /healthz 2026-07-04 19:10:07 +02:00
Dockerfile Extend readyz with backup freshness and a degraded status level (#85) 2026-07-11 19:02:59 +02:00
nest-cli.json Add NestJS API skeleton with config, logging, and /healthz 2026-07-04 19:10:07 +02:00
package.json Built-in MCP endpoint (Streamable HTTP) on top of the public API (#105) 2026-07-12 11:36:02 +02:00
tsconfig.build.json Add NestJS API skeleton with config, logging, and /healthz 2026-07-04 19:10:07 +02:00
tsconfig.json Add NestJS API skeleton with config, logging, and /healthz 2026-07-04 19:10:07 +02:00
vitest.config.ts Add user, identity, session, and auth-support data model 2026-07-05 00:42:22 +02:00
vitest.global-setup.ts Add the first-run setup wizard API with env-backed secret store (#80) 2026-07-11 15:10:28 +02:00