Skip to content

Integer overflow while uploading big files (> 2.1 GB) using webflux [SPR-17345] #21879

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

Closed
spring-projects-issues opened this issue Oct 5, 2018 · 2 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

wendigo opened SPR-17345 and commented

While uploading big files (> 2.1 GB) request ends with integer overflow that happens exactly here:

https://github.com/spring-projects/spring-framework/blob/master/spring-web/src/main/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReader.java#L141

Content-Length being Long is converted to int.

 


Referenced from: commits 6fe8cb9, 9064ef5

Backported to: 5.0.10

@spring-projects-issues
Copy link
Collaborator Author

Rossen Stoyanchev commented

This is converted to an int because that's what's expected by the MultiplartContext of the underlying multipart library. I've created synchronoss/nio-multipart#10 but in the mean time I can apply a workaround to to avoid the IllegalArgumentException. From what I can tell the contentLength property of MultipartContext is not used anywhere.

@spring-projects-issues
Copy link
Collaborator Author

Miroslav Hrúz commented

Hello, I've created pull request to the underlying library. 

synchronoss/nio-multipart#11

If they will accept that. You could change it to long directly

@spring-projects-issues spring-projects-issues added type: bug A general bug status: backported An issue that has been backported to maintenance branches in: web Issues in web modules (web, webmvc, webflux, websocket) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 5.1.1 milestone Jan 11, 2019
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: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants