Can not upload file which name contains double quote
- Dominant language
- C#
- Stars
- 183
- Forks
- 160
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 15
Description
I tried to upload file which name contains double quote
via BoxFilesManager.UploadAsync method.
But I couldn't.
I found
in HttpRequestHandler.BuildMultiPartRequest method
ContentDispositionHeaderValue.FileName property
does not accept file name which contains double quote.
```C#
var cdhv = new ContentDispositionHeaderValue("form-data");
cdhv.FileName = "\"file name contains \"(double quote)\""; // throw exception
```
Contributor guide
Research direction
Start with BoxFilesManager.UploadAsync and inspect how it reaches HttpRequestHandler.BuildMultiPartRequest. Reproduce the upload using a filename containing a double quote and verify the ContentDispositionHeaderValue.FileName failure. Done means the upload accepts such filenames without throwing and preserves the intended filename in the multipart request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100