{{ message }}
Repository navigation
fix: use jackson 2 compatible mapper for extensionquery - #2061
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns the /vscode/gallery/extensionquery GET implementation with the application-wide Jackson configuration to restore Jackson 2–compatible deserialization behavior (notably around missing/null primitive fields) and improves diagnostics for invalid GET query payloads.
Changes:
- Injects the Spring-managed
JsonMapperintoVSCodeAPIinstead of building a standalone mapper. - Enhances the GET
extensionqueryparse failure error message to include the underlying Jackson parse message. - Adds/extends MVC tests for the GET
q=variant and wiresJacksonConfiginto the web test slice.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Sanitize and bound the Jackson parse-failure message before putting it into the ResponseStatusException reason: strip control characters/newlines and truncate to 200 chars, since it is derived from attacker-controlled input and Spring propagates the reason into the response status line. - Add a POST regression test for #2059 (the actual reported incident), confirming the @RequestBody path fixed by JacksonConfig (#2052) still works end-to-end with pageNumber missing from the sibling sortBy/sortOrder fields. - Add a test asserting the sanitized message is single-line and length bounded. Co-Authored-By: Claude Sonnet 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.

This fixes #2059.
The GET variant for the extensionquery endpoint uses its own
JsonMapperinstead of an injected one. The defaultJsonMapperhas now backwards compatible settings for Jackson 2, use that mapper also for theVSCodeAPI.