spring-projects / spring-projects/spring-security
regression: Spring Security 7 Filters interfere with Spring Web StandardMultipartHttpServletRequest
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Describe the bug
When an authenticated user uploads a file larger than the configured spring.servlet.multipart.max-file-size then Spring Security returns 401.
To Reproduce
Clone the repo at https://github.com/filiphr/spring-security-boot-4-max-upload-size.
It has 2 folders:
boot-3- Displaying the behavior with Spring Boot 3.5 and Spring Security 6.5boot-4- Displaying the same behavior with Spring Boot 4.0.0-RC2 and Spring Security 7.0.0-RC3
Expected behavior
The expected behavior is that an authenticated user uploading a file larger than the configured size returns 413.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Clone the linked reproducer and compare its boot-3 and boot-4 folders. First run the oversized authenticated upload case and confirm the difference between the expected 413 and observed 401 responses. Trace the Spring Security 7 filter handling around the multipart request; done means the boot-4 behavior matches the authenticated Spring Security 6.5 case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- authentication, backend, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100