Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dtivel opened this issue Sep 27, 2024 · 3 comments · Fixed by #1060
Closed

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

dtivel opened this issue Sep 27, 2024 · 3 comments · Fixed by #1060
Assignees
Labels
author-verification-requested bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@dtivel
Copy link
Member

dtivel commented Sep 27, 2024

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

@sandy081 sandy081 modified the milestones: September 2024, October 2024 Sep 30, 2024
@sandy081 sandy081 added the bug Issue identified by VS Code Team member as probable bug label Sep 30, 2024
@connor4312
Copy link
Member

@sandy081 are you able to verify this? Don't think we have any docs on how to sign extensions manually...

@connor4312 connor4312 added the verification-steps-needed Steps to verify are needed for verification label Oct 23, 2024
@sandy081
Copy link
Member

Yes, we cannot verify this locally. I will ask @dtivel to check if this bug is indeed fixed for those who are seeing this.

@sandy081 sandy081 added author-verification-requested and removed verification-steps-needed Steps to verify are needed for verification labels Oct 24, 2024
@dtivel
Copy link
Member Author

dtivel commented Oct 24, 2024

@sandy081, @connor4312, I verified locally using vsce 3.2.1 and a local VSM instance.

@connor4312 connor4312 added the verified Verification succeeded label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author-verification-requested bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants