-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
Generate multipart boundary using SecureRandom [SPR-16635] #21176
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Milestone
Comments
Rossen Stoyanchev commented After some further investigation, it seems the default |
This was referenced Jan 11, 2019
I have exactly the same problem. I am using spring-web 5.3.9 and when I want to test bean which uploads multipart body I get this stacktrace due to SecureRandom:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Rossen Stoyanchev opened SPR-16635 and commented
From RFC 2046:
Currently
Random
is used to generate the boundary which guarantees the above will not occur by accident. In certain scenarios, based on an advanced and esoteric type of attack, it is theoretically possible for the boundary to be guessed and intermixed with content received as input from an outside source. We should switch to usingSecureRandom
to completely eliminate that possibility.Note however that the use of
SecureRandom
also introduces the possibility for lack of entropy depending on how the JVM is configured. This is a more general issue, however, not specific to the Spring Framework, but we need to provide guidance in the docs.Affects: 4.3.14
Issue Links:
Referenced from: commits f6ea740, e02ff3a, d007c25, ab2410c
Backported to: 4.3.15
The text was updated successfully, but these errors were encountered: