* [Sat, Jan 06, 2018 at 07:17:30AM +0000] Gian Piero Carrubba:
[...]
>Anyway I plan to send a more comprehensive patch that will not allow
>host names starting with a '-'. That is the same approach used by git,
>svn and, IIRC, hg.
>The rationale is that the use of '--' for signaling end of options is
>implementation-dependent (well, so is the use of '-' as the first char
>of an option). Given that AFAIK a host name starting with '-' is
>invalid as per RFC-1123, I don't see any problems in implementing it
>also in darcs.
I've fiddled a bit with this, and now I don't think it's a good idea.
The fact is that we don't actually care about the first character of the
hostname, but about the first character of the destination string, that
can be in one of the following formats:
- hostname[:port]
- user@hostname[:port]
- ssh://[user@]hostname[:port]
The problematic case is the second one. Usernames starting with a '-'
are theoretically possible on *nix, even if they probably do not work
because of restrictions imposed by different programs. The major
impediment is on Windows, as - if I've correctly read [0] - usernames
starting with a '-' are allowed (they call it 'dash', but I'm pretty
sure they mean the ASCII 'hyphen').
[0]
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/bb726984(v=technet.10)?redirectedfrom=MSDN
|