-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Allow leading spaces to bypass console aliases #13476
Merged
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
ghost
added
Area-CookedRead
The cmd.exe COOKED_READ handling
Area-Input
Related to input processing (key presses, mouse, etc.)
Impact-Compatibility
Sure don't work like it used to.
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Priority-2
A description (P2)
Product-Conhost
For issues in the Console codebase
labels
Jul 10, 2022
its0x08
approved these changes
Jul 10, 2022
lhecker
approved these changes
Jul 11, 2022
zadjii-msft
approved these changes
Jul 11, 2022
lhecker
added
the
AutoMerge
Marked for automatic merge by the bot when requirements are met
label
Jul 11, 2022
Hello @lhecker! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Thanks for the fix! |
DHowett
pushed a commit
that referenced
this pull request
Jul 19, 2022
## Summary of the Pull Request When you create a console alias that overrides an existing command, it should still be possible to execute the original command by prefixing it with a space. However, at some point in the past, there was an attempt to improve the usability by trimming leading spaces, and that ended up breaking this functionality. This PR reverts that change, so leading spaces can once again be used to bypass an alias. ## PR Checklist * [x] Closes #4189 * [x] CLA signed. * [x] Tests added/passed * [ ] Documentation updated. * [ ] Schema updated. * [x] I've discussed this with core contributors already. Issue number where discussion took place: #4189 ## Validation Steps Performed I've updated the existing alias unit test for leading spaces to match the new behavior, i.e. it now confirms that a command with leading spaces will not match the alias. I've also manually confirmed that the `doskey` test case reported in issue #4189 is now working as expected. (cherry picked from commit cd2166a) Service-Card-Id: 84072860 Service-Version: 1.15
🎉 Handy links: |
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-CookedRead
The cmd.exe COOKED_READ handling
Area-Input
Related to input processing (key presses, mouse, etc.)
AutoMerge
Marked for automatic merge by the bot when requirements are met
Impact-Compatibility
Sure don't work like it used to.
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Priority-2
A description (P2)
Product-Conhost
For issues in the Console codebase
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.
Summary of the Pull Request
When you create a console alias that overrides an existing command, it
should still be possible to execute the original command by prefixing it
with a space. However, at some point in the past, there was an attempt
to improve the usability by trimming leading spaces, and that ended up
breaking this functionality. This PR reverts that change, so leading
spaces can once again be used to bypass an alias.
PR Checklist
where discussion took place: Can't bypass DOSkey macro with leading space #4189
Validation Steps Performed
I've updated the existing alias unit test for leading spaces to match
the new behavior, i.e. it now confirms that a command with leading
spaces will not match the alias.
I've also manually confirmed that the
doskey
test case reported inissue #4189 is now working as expected.