-
Notifications
You must be signed in to change notification settings - Fork 388
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
Ignore comments in ssh_config Include parsing #1199
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
In addition to the requested test suite update, please search for "conventional commits" in CONTRIBUTING.md for info how to format the commit message and modify it accordingly (+ force-push with it).
57561fb
to
663255d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating.
I agree. We want to apply the changes consistently for similar cases. |
I rebased it. |
Co-authored-by: Koichi Murase <[email protected]>
I squashed commits. A similar change for the Host directive discussed in the following places haven't been processed, but I think they can be processed in a separate PR:
|
When parsing Include directive in ssh_config files, comments on the same line as the directive are considered as files to be recursively processed. Best case the recursive
max_depth=16
terminates this early, but on old versions it may lead to random reads or an infinite recursion, hanging the shell processExample before/after:
A minimal ssh client config file
The current sed expression
Proposed change to sed expression (ignore anything coming after a
#
)