From: Torsten Bögershausen Date: Tue, 03 May 2016 16:30:26 GMT Subject: Re: [PATCH v4 01/11] add fetch-pack --diag-url tests for some corner cases Message-ID: In-Reply-To: On 2016-05-03 18.07, Junio C Hamano wrote: > Mike Hommey writes: > >> t5603-clone-dirname uses url patterns that are not tested with >> fetch-pack --diag-url, and it would be useful if they were. >> >> Interestingly, some of those tests, involving both a port and a >> user:password pair, don't currently pass. Note that even if a >> user:password pair is actually not supported by git, the values used >> could be valid user names (user names can actually contain colons >> and at signs), and are still worth testing the url parser for. > > I am not sure about the last part of this (and the tests in the > patch for them). When you are constrained by the Common Internet > Scheme Syntax, i.e. > > ://:@:/ > > you cannot have arbitrary characters in these parts; within the user > and password field, any ":", "@", or "/" must be encoded. > I thinnk we have an old bug here: if (is_url(url_orig)) url = url_decode(url_orig); else url = xstrdup(url_orig); The the url should be separated into the components first, and afther that url-path should got into url_decode, and may be password, username.... (That's out of my head)