Skip to content

Publishing signed extension fails if file name contains special character #1059

@dtivel

Description

@dtivel

If either file name in a signed extension publish contains a special character, publish will fail with "Invalid part headers." This is because the Content-Disposition header for each file part contains the original file name, and its filename property has rules which aren't being followed.

Repro steps

  1. vsce publish --packagePath <FileNameWith@Character> --sigzipPath <FileNameWith@Character>

Expected result

Publish will succeed.

Actual result

Publish fails with "Invalid part headers."

https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Disposition#as_a_response_header_for_the_main_body says:

The quotes around the filename are optional, but are necessary if you use special characters in the filename, such as spaces.

More thorough guidance is in https://www.rfc-editor.org/rfc/rfc6266#section-4.3

CC @sandy081, @sbanni

Metadata

Metadata

Assignees

Labels

author-verification-requestedIssues potentially verifiable by issue authorbugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions