[FIX] AmazonS3: Quote file.name for ContentDisposition for files with commas#8593
Conversation
Adds quotes around the filename attribute. See: - RocketChat#8584 - https://stackoverflow.com/questions/38320996/s3-downloading-images-with-comma-in-filename-results-in-neterr-response-heade Fixes RocketChat#8584
|
The quicker this gets out the better because I have no idea how to retroactively fix these attributes because they're stored IN S3. This was caused by #8296, which introduced the Content-Distribution attribute in order to de-obfuscate names during download, the problem is/was that the Firefox apparently happily ignores the double headers, but chromium and all chromium/blink based browsers do not and throw up a |
|
Also see this badly placed comment, that I totally did not see until after the fact, lol. : 3e72e0c#commitcomment-25082377 |
|
Bear in mind one thing worth nothing that I just thought of are files with double quotes now.. Not exactly sure how that will be handled (i.e. escaped properly), but it should be a lesser occurrence than other odd chars in file names. |
[FIX] AmazonS3: Quote file.name for ContentDisposition for files with commas
Adds quotes around the filename attribute.
See:
Fixes #8584
@RocketChat/core