Skip to content

Fix Match tagged (unsupported criteria) always matching - #2725

Open
Parsiffall1 wants to merge 2 commits into
paramiko:mainfrom
Parsiffall1:fix/2715-match-tagged-never-matches
Open

Parsiffall1 wants to merge 2 commits into
paramiko:mainfrom
Parsiffall1:fix/2715-match-tagged-never-matches

Conversation

@Parsiffall1

Copy link
Copy Markdown

Summary

Fixes #2715.

Unsupported Match criteria such as OpenSSH's tagged left passed as None in _does_match, which was treated as success. A Match tagged ... block appearing before a Host stanza could therefore override host-specific settings (for example User).

Unsupported criteria now never match. Match canonical keeps 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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] - ssh_config Match tagged statement always applies

1 participant