Skip to content

fix(api): resolve the CSRF vs WebSocket handshake conflict #200

Description

Summary

Browsers cannot set an X-CSRF-Token header on a WebSocket upgrade; csrf.go:23-29 CSRFTokenValidator requires it for upgrades on /ws, so legitimate browser WS connections may be blocked.

Acceptance Criteria

  • Allow WS upgrade with a suitable auth mechanism (e.g. token query/header, Origin check)
  • Keep CSRF protection for state-changing HTTP
  • Integration test of browser-style WS connect

Complexity

High.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programfeatureFeature to implementhigh-complexityHigh-complexity backend task requiring deep architectural worksecuritySecurity vulnerability

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions