Skip to content

Codex: compare OAuth state as bytes; document both local callback URIs - #158

Merged
sykosyber merged 2 commits into
mainfrom
wp/omni/connect-fixes
Oct 12, 2026
Merged

sykosyber merged 2 commits into
mainfrom
wp/omni/connect-fixes

Conversation

@sykosyber

Copy link
Copy Markdown
Member

Objective. Fix the two Codex findings on #156 (merged before review finished).

What changed

  • oauthConnect.ts: state is compared byte length first, so a non-ASCII state of the same character length is refused instead of throwing RangeError (a 500). The new test reproduced the RangeError before the fix.
  • .env.example and DEPLOYMENT.md: register a redirect URI for every origin Flyspace is opened at. For local use that means both http://localhost:3000/... and http://127.0.0.1:3000/..., because Google matches exactly and the README's default is localhost.

What did not change. The flow, scopes, and cookie.

Tests run. typecheck 0 errors; lint 0 errors (8 existing warnings); npm test 1622 passed, 1 failed (fieldHarness.test.ts, known Windows-only CRLF). New: oauthConnect.test.ts non-ASCII state case.

Measurements. None. Known failures. fieldHarness on Windows only. Claim ceiling. Tested with stubs. Architectural decisions introduced. None.

Evidence that could falsify it. A callback request that still answers 500 for a malformed state.

Next permissible package. Catalog rebuild after #157.

🤖 Generated with Claude Code

… URIs

A non-ASCII state of the right length in characters made timingSafeEqual
throw (500) instead of refusing the sign-in. And localhost and 127.0.0.1
are different origins to Google, so local setup needs both redirect URIs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sykosyber
sykosyber enabled auto-merge October 12, 2026 23:16
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T23:18:23.348819Z 7b38270 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b38270765

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread DEPLOYMENT.md Resolved
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Codex feedback round 1 answered 1 of 1 Codex finding(s).

@sykosyber
sykosyber merged commit 7e829bb into main Oct 12, 2026
5 checks passed
@sykosyber
sykosyber deleted the wp/omni/connect-fixes branch October 12, 2026 23:22
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