Bug 3474

Summary: ssh_config can escape double quotes with a backslash
Product: Portable OpenSSH Reporter: unknowndevqwq
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: NEW ---    
Severity: enhancement CC: djm
Priority: P5    
Version: 9.0p1   
Hardware: Other   
OS: Linux   

Description unknowndevqwq 2022-09-23 00:39:22 AEST
Some match exec rules may require more than one pair of double quotes, but the current ssh_config will simply truncate the first pair and ignore the backslash-escaped double quotes and other special character conventions
Comment 1 Damien Miller 2022-09-24 11:49:44 AEST
readconf.c:match_cfg_line() probably needs to be converted from strdelim() to argv_split() for this to happen.
Comment 2 unknowndevqwq 2022-10-11 04:51:15 AEDT
(In reply to Damien Miller from comment #1)
> readconf.c:match_cfg_line() probably needs to be converted from
> strdelim() to argv_split() for this to happen.

s/strdelim()/argv_split()/
Like this?
Comment 3 Damien Miller 2022-10-11 09:34:05 AEDT
No unfortunately - it's a bit more of a substantial rewrite than that. strdelim() is an incremental tokeniser whereas argv_split() turns a string into a vector of arguments in one go.

https://github.com/openssh/openssh-portable/commit/ea9e45c89a is the commit where we started using it for config parsing if you want to have a go at this yourself.
Comment 4 unknowndevqwq 2022-10-13 15:20:07 AEDT
Sorry, I can't do it.