Skip to content

fix(security): encode redirect_uri, limit state payload, fix iframe timeout#35

Merged
lakhansamani merged 1 commit intomainfrom
fix/security-encode-redirect-uri-limit-state-iframe-timeout
Apr 5, 2026
Merged

fix(security): encode redirect_uri, limit state payload, fix iframe timeout#35
lakhansamani merged 1 commit intomainfrom
fix/security-encode-redirect-uri-limit-state-iframe-timeout

Conversation

@lakhansamani
Copy link
Copy Markdown
Contributor

Summary

  • URL encoding (HIGH): redirect_uri and state params in OAuth login URLs are now properly URL-encoded with encodeURIComponent()
  • State payload (HIGH): URL state parameter now only serializes clientID, redirectURL, authorizerURL — no longer leaks extraHeaders or other config
  • iframe timeout (MEDIUM): executeIframe timeout now properly rejects the promise instead of silently hanging

Files Changed

  • src/index.ts — URL encoding + state payload limiting
  • src/utils.ts — iframe timeout rejection

Test plan

  • Verify OAuth login flow works with special characters in redirect_uri
  • Verify state parameter no longer contains extraHeaders
  • Verify iframe timeout surfaces error to caller

@lakhansamani lakhansamani merged commit b7510ed into main Apr 5, 2026
2 checks passed
@lakhansamani lakhansamani deleted the fix/security-encode-redirect-uri-limit-state-iframe-timeout branch April 5, 2026 02:02
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