Repository navigation
Fix Match tagged (unsupported criteria) always matching - #2725
Open
Parsiffall1 wants to merge 2 commits into
Open
Parsiffall1 wants to merge 2 commits into
Parsiffall1 wants to merge 2 commits into
Conversation
Unsupported Match keywords left passed as None and were treated as successful matches, so a Match tagged block before a Host stanza could override host-specific settings. Treat unsupported criteria as never matching; keep canonical's existing hard-gate behavior. Fixes paramiko#2715
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.
Summary
Fixes #2715.
Unsupported
Matchcriteria such as OpenSSH'staggedleftpassedasNonein_does_match, which was treated as success. AMatch tagged ...block appearing before aHoststanza could therefore override host-specific settings (for exampleUser).Unsupported criteria now never match.
Match canonicalkeeps its existing hard-gate behavior. Negated unsupported criteria (e.g.Match !tagged) still match, consistent with “not tagged” when tags are not implemented.Test plan
TestMatchUnsupportedcovering the [BUG] - ssh_configMatch taggedstatement always applies #2715 three-case repro, tagged-alone, negated unsupported, and thatMatch hoststill workspytest tests/test_config.py— 118 passed, 7 skipped