[MAGNOLIA-7392] CosMultipartRequestFilter overwrites temp files from other requests with same filename Created: 11/Oct/18 Updated: 11/Oct/18 |
|
| Status: | Open |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | 5.4.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Ueli Scheidegger | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | multipart, upload | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Description |
|
The CosMultipartRequestFilter parses multipart requests and stores the uploaded files in the temp folder. At the end of the request-response-loop it cleans up the temp folder by deleting the files again. Unfortunately it stores the files under their regular file name. It seems like this could be changed by providing a FileRenamePolicy, however, CosMultipartRequestFilter does not provide one. When you have two users who upload a file named "image.jpg", not only will the upload be overwritten but as soon as the first request is done, the file will be deleted too, so the second request will then have no more file to work with. |