Repository navigation
fix(oauth): reject control characters in access tokens - #52
Merged
riffingonsoftware merged 1 commit intoSep 23, 2026
Merged
Conversation
Contributor
Author
cmars
approved these changes
Sep 23, 2026
benburkert
added a commit
that referenced
this pull request
Oct 7, 2026
…pp id The CLI renamed the token-issuance RPC from IssueJWT to IssueToken (keycardai/cli#1246). Connect addresses a procedure by URL path, so the old path answers 404 on any CLI that has the rename. WithAgentAppID declares the Keycard application the caller acts for (keycardai/cli#1255-#1257). It is sent as appId only when set, so a server that predates the field sees the request it already understands. IsApplicationNotFound and IsUnavailable read the two codes the server's app id resolution adds, and IsDeclined and IsAuthorizationRequired now document the wider set of causes those codes carry on the CLI's main branch. A token containing a control character is refused, matching the check #52 added to token exchange: what the agent vends may be an opaque third-party secret, and it is headed for an Authorization header. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was looking at some unrelated changes, I noticed that token responses containing control characters were accepted without an error. This change rejects those tokens in the response parser.