Commit 902367f
committed
Test that leading-
This test was absent before, but seems important to add to verify
that the code there was correct (it was), but also because I plan
to refactor that code to use `host_as_argument` rather than the
older (in some cases potentially ambiguous) `host_argument_safe`.
This is specific to the case where a command like `ssh -G` -- but
where `ssh` is an uncertain command such that gix-transport tries
to figure out what is -- is used. A netloc is passed as part of
that, but the netloc used consists only of a host and not a
username, even when this is a step in a longer process that will
later use (and check the safety of) the username. So only the host
has to be checked (at that stage) to make sure it cannot masquerade
as an option argument.- host names aren't used in -G check1 parent 524739b commit 902367f
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
319 | 324 | | |
320 | | - | |
| 325 | + | |
321 | 326 | | |
322 | 327 | | |
323 | 328 | | |
| |||
0 commit comments