Repository navigation
fix: accept OAuth token responses with long headers - #2381
Merged
Merged
Conversation
httpcore5 5.4.3 and later reject header lines over 8192 bytes. GitHub's token response now carries a longer Content-Security-Policy header, so the code exchange failed with "Maximum line length limit exceeded" and login broke. Build the token client on an HttpClient with a 64 KiB line limit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
netomi
added a commit
that referenced
this pull request
Oct 23, 2026
…2382) * fix: stop reporting a namespace ownership conflict once the namespace has an owner Backport of #2380 to 1.2.x, without the changelog entry. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix: accept OAuth token responses with long headers httpcore5 5.4.3 and later reject header lines over 8192 bytes. GitHub's token response now carries a longer Content-Security-Policy header, so the code exchange failed with "Maximum line length limit exceeded" and login broke. Build the token client on an HttpClient with a 64 KiB line limit. Backport of #2381 to 1.2.x, without the changelog entry. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
netomi
added a commit
that referenced
this pull request
Oct 24, 2026
…2383) * chore: fix changelog after 1.3.0 has been released (cherry picked from commit c96a639) * fix: stop reporting a namespace ownership conflict once the namespace has an owner Backport of #2380 to 1.3.x, without the changelog entry. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix: accept OAuth token responses with long headers httpcore5 5.4.3 and later reject header lines over 8192 bytes. GitHub's token response now carries a longer Content-Security-Policy header, so the code exchange failed with "Maximum line length limit exceeded" and login broke. Build the token client on an HttpClient with a 64 KiB line limit. Backport of #2381 to 1.3.x, without the changelog entry. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * docs: add changelog entries for the 1.3.x login and namespace conflict fixes Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <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.
Problem
GitHub login fails with:
httpcore5 5.4.3 and later reject header lines over 8192 bytes (older versions had no limit); 5.4.3 came in with the CVE-2026-54428 fix (#1977). GitHub's successful token response now carries a
Content-Security-Policyheader longer than that, so the code exchange fails. The wire log shows the status line and the first headers parse fine and the failure is on that header. The same code fails on commits before the Spring Boot 4.0.9 bump and before the TanStack migration, so it is not a regression from those.Change
TokenResponseClientsbuilds the authorization-code token client on an HttpClient 5 connection manager withmaxLineLengthraised to 64 KiB. It uses the same converters and error handler as the client Spring Security builds by default, and honours system properties (proxy settings).SecurityConfigpasses it tooauth2LoginviatokenEndpoint(...).There is no configuration route: the limit can only be set on
Http1Config, and Spring Security's token client builds its ownRestClient, so Spring Bootspring.http.client.*settings do not reach it. Pinning httpcore5 back below 5.4.3 would reintroduce the CVE.Testing
TokenResponseClientsTestserves a token response with a 20 KB header from a local server. With the limit at 8192 it fails with the exact error above (MessageConstraintException: Maximum line length limit exceeded); with the fix it passes.spotlessCheckand theorg.eclipse.openvsx.security.*tests pass. The full./gradlew testsuite and a login against real GitHub were not run.Notes
RestTemplateConfig, scanning, trusted publishing) keep the 8192 default; none of them has been seen to fail.🤖 Generated with Claude Code