Description
Describe the bug
After upgrading Spring Boot from 2.7.11 (Spring Security 5.7.8) to 3.1.2 (Spring Security 6.1.2) uploading multipart file has stopped working. We are using Apache Camel for processing uploaded file.
To Reproduce
We have created repo with example (https://github.com/McNullty/camel-upload-with-security), on branch master we have used latest versions of Spring Boot / Spring Security and Camel, on branch old-spring boot there is version with older versions of Spring and Camel.
We have also tested latest Camel without Spring Security and it is working as expected.
Expected behavior
Example can be tested by sending any file with curl, eg.:
curl --location 'http://localhost:8080/camel/upload' \
--header 'Authorization: Basic dXNlcjpwYXNz' \
--form 'file=@"/path/examples.yaml"'
Expected behavior is that In Camel exchange body there is file with size different than 0.
Sample
A link to a GitHub repository with a minimal, reproducible sample.