fix(api): resolve CSRF guard ordering with global AuthGuard #514

Merged
jason.woltje merged 1 commits from fix/csrf-guard-ordering into main 2026-02-26 02:26:03 +00:00
Owner

Summary

  • CsrfGuard (global APP_GUARD) runs before per-controller AuthGuard, so request.user is always undefined during CSRF validation
  • This causes CSRF
## Summary - CsrfGuard (global APP_GUARD) runs before per-controller AuthGuard, so request.user is always undefined during CSRF validation - This causes CSRF
jason.woltje added 1 commit 2026-02-26 02:25:46 +00:00
fix(api): resolve CSRF guard ordering with global AuthGuard
All checks were successful
ci/woodpecker/push/api Pipeline was successful
ae9ac808c1
CsrfGuard (APP_GUARD) runs before per-controller AuthGuard, so
request.user is always undefined when CSRF validates session binding.
Skip HMAC session-binding check when user context is unavailable;
the double-submit cookie pattern (cookie matches header) provides
sufficient CSRF protection on its own.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason.woltje merged commit 9f4de1682f into main 2026-02-26 02:26:03 +00:00
jason.woltje deleted branch fix/csrf-guard-ordering 2026-02-26 02:26:03 +00:00
Sign in to join this conversation.