Skip to content

Validate OAuth callback state#1986

Open
Jorel97 wants to merge 1 commit into
SecureBananaLabs:mainfrom
Jorel97:codex/oauth-callback-state-743
Open

Validate OAuth callback state#1986
Jorel97 wants to merge 1 commit into
SecureBananaLabs:mainfrom
Jorel97:codex/oauth-callback-state-743

Conversation

@Jorel97
Copy link
Copy Markdown

@Jorel97 Jorel97 commented May 30, 2026

/claim #743

Summary

  • Require OAuth callbacks to include a single non-empty state query parameter before returning callback success.
  • Return the shared 400 JSON response for missing, blank, or repeated state values.
  • Add HTTP regression tests for missing state, repeated state, and valid callback preservation.

Fixes #1982.

Demo

Short demo video: https://github.com/Jorel97/bounty-demo-assets/raw/main/securebanana/securebanana-1982-oauth-state-demo.mp4

Validation

  • node --check apps/api/src/controllers/authController.js
  • node --check apps/api/src/tests/oauthState.test.js
  • node --test apps/api/src/tests/health.test.js apps/api/src/tests/oauthState.test.js
  • git diff --check

Note: npm test -w apps/api still fails on the existing upstream script node --test src/tests, which Node resolves as a missing module path in this checkout; the explicit test files above pass.

github-actions Bot added a commit that referenced this pull request May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OAuth callback should reject missing state parameter

1 participant