-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Block control codes and truncate longer configuration text blocks #4436
Merged
Conversation
This file contains 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
Member
msftrubengu
approved these changes
May 1, 2024
yao-msft
approved these changes
May 1, 2024
JohnMcPMS
added a commit
to JohnMcPMS/winget-cli
that referenced
this pull request
May 2, 2024
…crosoft#4436) All control codes in the range [0x0, 0x20) and the DELETE control code 0x7F (with the exceptions of the tab, line feed, and carriage return characters) will result in an error from the YAML parser. An alternative solution is to convert them to their control pictures, but it was decided that it was best to fail at this time. The configuration output for each unit during the "show" portion (used by almost all of the commands to display details about the file) will limit the amount of output allowed for any field that comes from an external source. Data from the file will present a warning that it was truncated just below its output. If anything is truncated, an overall "error" will be output as well.
This was referenced May 8, 2024
This was referenced May 8, 2024
Merged
Merged
Merged
Merged
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.
Change
All control codes in the range [0x0, 0x20) and the DELETE control code 0x7F (with the exceptions of the tab, line feed, and carriage return characters) will result in an error from the YAML parser. An alternative solution is to convert them to their control pictures, but it was decided that it was best to fail at this time.
The configuration output for each unit during the "show" portion (used by almost all of the commands to display details about the file) will limit the amount of output allowed for any field that comes from an external source. Data from the file will present a warning that it was truncated just below its output. If anything is truncated, an overall "error" will be output as well.
Validation
New and old tests alike.
Microsoft Reviewers: Open in CodeFlow