Repository navigation
Preserve file extensions so msix can be signed, and fail when signing does not happen - #21
Closed
JoshuaPeddle wants to merge 1 commit into
Closed
JoshuaPeddle wants to merge 1 commit into
JoshuaPeddle wants to merge 1 commit into
Conversation
… does not happen TownSuite/TownSuite.IssueTracker#15101 Uploads were stored under a generated id with no extension, so signtool did not recognize an msix and failed the whole batch, leaving the msi and exe unsigned as well. The failure was then invisible: batch errors were written under the batch id but polled for under the file id, and the client treated its own timeout as success, so builds published unsigned installers. - Client sends the original extension as X-FileExtension on upload and poll, and the service keeps it on the working file so signtool recognizes msix and appx. An absent header keeps the previous behaviour. - Validate that extension against a short alphanumeric pattern before it reaches a signtool command line. - GET /sign/batch checks the batch level error file as well as the per-file one, so a batch failure returns 500 instead of 425 until the client gives up. - DownloadSignedFiles reports files still outstanding when the batch timeout expires, so a timeout exits non-zero. - Add coverage, including an end to end msix sign through the batch endpoint using real makeappx and signtool.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Uploads were stored under a generated id with no extension. signtool selects the handler for container formats such as msix by file name, so it refused the package and exited non-zero for the whole batch, which left the msi and exe unsigned too. Two further defects hid that: a batch level signing error was written under the batch id but polled for under the per-file id, so every poll saw 425 until the client's 1200 second timeout, and the client then reported no failures and exited 0, so the pipeline published unsigned installers to Box. The client now sends the original extension on upload and poll, the service keeps it on the working file, batch errors are surfaced to pollers, and an expired batch timeout is reported as a failure.
Motivation and Context
https://github.com/TownSuite/TownSuite.IssueTracker/issues/15101
Types of changes
Checklist: