box / box/box-windows-sdk-v2

Can not upload file which name contains double quote

Open
#671 2 comments 0 reactions 0 assignees View on GitHub
bug dontstale
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.