Skip to content

fix(auth): preserve IPv6 verification URL brackets - #232

Open
dipeshbabu wants to merge 1 commit into
openai:mainfrom
dipeshbabu:agent/preserve-ipv6-auth-url-bracket
Open

fix(auth): preserve IPv6 verification URL brackets#232
dipeshbabu wants to merge 1 commit into
openai:mainfrom
dipeshbabu:agent/preserve-ipv6-auth-url-bracket

Conversation

@dipeshbabu

Copy link
Copy Markdown
Contributor

Summary

  • preserve the closing bracket that is part of an IPv6 authentication URL host
  • continue trimming punctuation and brackets that merely surround a URL in terminal prose
  • cover plain IPv6 hosts, bracket-enclosed ordinary URLs, and bracket-enclosed IPv6 URLs

Root cause

The authentication URL extractor treated every trailing ] as punctuation. For a valid URL such as https://[2001:db8::1], that character is structural, so removing it made URL parsing fail and caused the login instructions to omit the verification URL.

Impact

Interactive device login now retains valid external IPv6 verification URLs while continuing to reject local addresses and strip surrounding prose punctuation.

Validation

  • pnpm dlx bun test --timeout 30000 ./tests-ts/auth.test.ts (17 passed, 1 skipped)
  • pnpm exec tsc --noEmit
  • pnpm exec prettier --check src/auth.ts tests-ts/auth.test.ts
  • git diff --check

@github-actions github-actions Bot added the bug Something isn't working label Aug 3, 2026
@mldangelo-oai

Copy link
Copy Markdown
Collaborator

@codex review exact head 74e6b9e

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 74e6b9e523

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 74e6b9e523

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@dipeshbabu
dipeshbabu force-pushed the agent/preserve-ipv6-auth-url-bracket branch from 74e6b9e to e18f3d9 Compare August 4, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants