| Summary: | Ignoring comments at end of config file lines broke ProxyCommand with #-sign in script | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Tomi Salminen <tlsalmin> | ||||||
| Component: | ssh | Assignee: | Damien Miller <djm> | ||||||
| Status: | CLOSED FIXED | ||||||||
| Severity: | normal | CC: | djm, tomek.orzechowski | ||||||
| Priority: | P5 | ||||||||
| Version: | 8.5p1 | ||||||||
| Hardware: | amd64 | ||||||||
| OS: | Linux | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 3302 | ||||||||
| Attachments: |
|
||||||||
|
Description
Tomi Salminen
2021-03-26 03:01:18 AEDT
Created attachment 3489 [details]
Fix proposal.
Pull request https://github.com/openssh/openssh-portable/pull/237 I'm not sure this fix is correct either - it solves your particular case, but doesn't deal with # characters in quoted strings. Maybe we should just revert the original commit until a comprehensive fix is ready. *** Bug 3309 has been marked as a duplicate of this bug. *** Created attachment 3528 [details]
Use a better tokeniser for ssh/sshd_config parsing
I plan to commit this soon - it switches ssh_config and sshd_config parsing to the argv_split() tokeniser, and gives this tokeniser the ability to terminate when it encounters an unquoted '#' character.
This should fix this bug, but also improve quote handling in configuration files generally. Note that the tokeniser is not used for command-line arguments (e.g. ProxyCommand), so there should be no behaviour change there other than fixing the '#' truncation regression.
this diff, with a few bugfixes has been committed and will be in openssh-8.7 closing bugs resolved before openssh-8.9 |