Skip to content

The AbstractJacksonMessageConverter may got confused with wrong content-type from the message #3520

Closed

Description

@artembilan

The current logic is:

String contentType = properties.getContentType();
		if (this.assumeSupportedContentType && contentType.equals(MessageProperties.DEFAULT_CONTENT_TYPE)
				|| contentType.contains(this.supportedContentType.getSubtype())) {

The contains() is too wide and may end-up accepting something like multipart/form-data; boundary=json.

Consider to fix using MimeType.isCompatibleWith(), e.g. set an application/*+json from the JacksonJsonMessageConverter. That will make it compatible with any JSON-based content-type.

Activity

  1. added this to the 4.1.1 milestone on Jul 15, 2026
  2. self-assigned this
    on Jul 15, 2026
  3. added theissue type on Jul 15, 2026
  4. added a commit that references this issue on Jul 20, 2026
  5. added a commit that references this issue on Jul 20, 2026
  6. added a commit that references this issue on Oct 26, 2026
  7. added 2 commits that reference this issue on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions