Re: [PATCH v2 1/3] connect.c: allow ssh://user@[2001:db8::1]/repo.git

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v2 1/3] connect.c: allow ssh://user@[2001:db8::1]/repo.git

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:03:53

Torsten Bögershausen [off-list ref] writes:
The ssh:// syntax was added in 2386d65822c91, it accepted
ssh://user@2001:db8::1/repo.git, which is now legacy.
Please do not quote just a raw object name, but annotate it so that
we can more easily tell what the change was about and how far back
in the history it was done without having to run "git show -s" on
it.
Over the years the parser was improved to support [] and port numbers,
but the combination of ssh://user@[2001:db8::1]:222/repo.git did
never work.

The only only way to use a user name, a literall IPV6 address and a port
number was ssh://[user@2001:db8::1]:222/repo.git
Let me double check if I understand Brian and the above correctly:

 * The original 2386d658 (Add first cut at "git protocol" connect
   logic., 2005-07-13) did not even care that the IPv6 syntax was
   valid or not, and worse yet, it did not correctly handle literal
   addresses in brackets;

 * Later we started supporting literal addresses in brackets, but
   "user@[literal]:port" form did not work.  Instead, a bug in the
   parser allowed "[user@literal]:port" (which is not a valid way to
   spell such things) to work as if it were "user@[literal]:port",
   which is what users would expect.

 * This three-patch series is an attempt to allow that kosher
   syntax, "user@[literal]:port", to work.

 * It does not terribly matter if we broke the invalid syntax
   "user@literal:port" without brackets, and it might even be
   beneficial if we declared such addresses invalid and deprecated
   for the sake of uniformity with other protocols.  Making that
   judgement, however, is outside the scope of this series.
   "user@literal:port" will continue to behave as it did before.

Is that what is going on?

If that is the case, I think it addresses Brian's concern well.

Thanks.

(I haven't checked the patch text itself yet, though).

Re: [PATCH v2 1/3] connect.c: allow ssh://user@[2001:db8::1]/repo.git

From: brian m. carlson <hidden>
Date: 2016-06-15 23:03:53

On Sun, Feb 22, 2015 at 11:37:40AM -0800, Junio C Hamano wrote:
Let me double check if I understand Brian and the above correctly:

* The original 2386d658 (Add first cut at "git protocol" connect
  logic., 2005-07-13) did not even care that the IPv6 syntax was
  valid or not, and worse yet, it did not correctly handle literal
  addresses in brackets;

* Later we started supporting literal addresses in brackets, but
  "user@[literal]:port" form did not work.  Instead, a bug in the
  parser allowed "[user@literal]:port" (which is not a valid way to
  spell such things) to work as if it were "user@[literal]:port",
  which is what users would expect.

* This three-patch series is an attempt to allow that kosher
  syntax, "user@[literal]:port", to work.
Yes.  My overwhelming concern is that this work, because this is the 
syntax we want people to use and that they will expect to work based on 
the standards, other software, and Git using HTTPS.
* It does not terribly matter if we broke the invalid syntax
  "user@literal:port" without brackets, and it might even be
  beneficial if we declared such addresses invalid and deprecated
  for the sake of uniformity with other protocols.  Making that
  judgement, however, is outside the scope of this series.
  "user@literal:port" will continue to behave as it did before.
That's an accurate assessment of my position.
Is that what is going on?

If that is the case, I think it addresses Brian's concern well.
Yes, if that's the case, it addresses my concern.
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help