You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When spring.webflux.multipart.max-disk-usage-per-part is set to value that translates to more than MAX_INT bytes (e.g., 3000MB), it causes misconfiguration and consequently much smaller files/parts are denied with HTTP code 413.
The root cause is this code in ReactiveMultipartAutoConfiguration:
Fix should be simply using .as(DataSeize::toBytes) instead since setMaxDiskUsagePerPart accepts parameter of type long and there's no need for conversion to int.
The text was updated successfully, but these errors were encountered:
wilkinsona
changed the title
spring.webflux.multipart.max-disk-usage-per-part=3000MB is mishandled in ReactiveMultipartAutoConfiguration
spring.webflux.multipart.max-disk-usage-per-part behaves incorrectly for values where the number of bytes overflows an int
Oct 31, 2023
When
spring.webflux.multipart.max-disk-usage-per-part
is set to value that translates to more than MAX_INT bytes (e.g., 3000MB), it causes misconfiguration and consequently much smaller files/parts are denied with HTTP code 413.The root cause is this code in
ReactiveMultipartAutoConfiguration
:Fix should be simply using
.as(DataSeize::toBytes)
instead sincesetMaxDiskUsagePerPart
accepts parameter of typelong
and there's no need for conversion toint
.The text was updated successfully, but these errors were encountered: