-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem uploading multipart file after migrating to latest Spring Security. #13731
Comments
I have found workaround. If I add
I have also found that if I put log statement that "tickles" Eg.
|
Prior to this commit, the ServletRequest#getParameter method was used in order to verify if the matchingRequestParameterName was present in the request. That method has some side effects like interfering in the execution of the ServletRequest#getInputStream and ServletRequest#getReader method when the request is an HTTP POST (if those methods are invoked after getParameter, or vice-versa, the content won't be available). This commit makes that we only use the query string to check for the parameter, avoiding draining the request's input stream. Closes spring-projectsgh-13731
@marcusdacoregio your solution is working. Early I had What is the difference between |
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.:
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.
The text was updated successfully, but these errors were encountered: