Skip to content

[TEK-0000] Fail closed when a CSRF-bound callback is parsed without its token - #528

Draft
AkashHC13 wants to merge 1 commit into
masterfrom
TEK-0000-csrf-fail-closed
Draft

[TEK-0000] Fail closed when a CSRF-bound callback is parsed without its token#528
AkashHC13 wants to merge 1 commit into
masterfrom
TEK-0000-csrf-fail-closed

Conversation

@AkashHC13

Copy link
Copy Markdown
Contributor

TEK-0000 (placeholder — ticket not yet filed)

  • parseTokenRequestCallbackParams guarded the CSRF comparison on a truthy csrfToken (tpp/src/main/Member.js:302), so a callback whose state carries a csrfTokenHash verified with no session binding at all when the caller omitted the token; it now throws.
  • That hash is the only per-session binding the V1 redirect has — the ED25519 signature covers just token_id and state (lib-proto token.proto:435) — and our own reference merchant omits the token (merchant-demo/server/merchant.js#L440).
  • Non-breaking: the guard fires only where setCSRFToken was used at request creation, so integrations that never opted in are untouched. @token-io/tpp 3.0.0 → 3.1.0. It does not cover an integration that never set a CSRF token — that needs the always-required variant and merchant comms.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant