SenseNet / sensenet

Open Source Content Services Platform written in .NET
https://sensenet.com
GNU General Public License v2.0
173 stars 112 forks source link

Decode Content-Disposition filename value #2048

Closed hashtagnulla closed 6 months ago

hashtagnulla commented 7 months ago

Problem

When a user tries to upload a file with non-ASCII filename, the backend throws a 500 - Internal Server Error response.

Reproduction

  1. Create a file that's size is higher than the default chunk size and it's name should contain non-ASCII characters
  2. Create a request that tries to upload the created file to a repository. Content-Disposition's filename value must be encoded!
  3. Observe the response, which will be HTTP 500.

Solution

Content Disposition's filename part should be decoded.