Form data being parsed with JSON mapper causes 500 #34660
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: waiting-for-triage
An issue we've not yet triaged or decided on
Bug description
I'm having an issue with form data when using content type /. I managed to pinpoint it to this fix on Jackson Databind.
What happens now when initializing form data in DefaultServerWebExchange (code) is that JSON mappers also say they can read form data (here) and parsing therefore fails (because they can't).
Before this Jackson fix, ObjectMapper answered that it couldn't deserialize MultiValueMap.
Bug reproduce
Here is the simplest dummy app I've managed to build which replicates the issue: https://github.com/Dodomix/form-data-jackson-bug. The test fails with version 3.4.4 of Spring Boot, and passes with 3.4.3 (change in Jackson 2.18.2 -> 2.18.3). I'm opening the report here because the problematic code is in spring-web.
The exact behavior which changed in Jackson:
Expected behavior
All tests pass.
System info
Java: Temurin 24
The text was updated successfully, but these errors were encountered: