Community
Participate
Working Groups
URIish currently accept incorrect git URIs and parse whem a little bit wrong. For exaple, URIish accepts incorrect URI "ssh://some-host:/path/to/repository.git". It is incorrect because of redundant ':' after the host. After that getHost() method returns: "some-hos" and getPath() method returns: "t:/path/to/repository.git". Test to reproduce the bug is attached.
Created attachment 170944 [details] test to reproduce the problem
I try to fix this with http://egit.eclipse.org/r/#change,1690. I solved one thing differently. I cannot come up with a URISyntaxException because the syntax is not so bad as we both think. URI's are mainly a scheme, a colon and then a scheme specific part (which can be nearly anything). Not the generic URIish parsing but the ssh specific code can tell that the URI is wrong. So, in my proposal the URI parsing will go through but calling the various "...canHandle()" methods in our transport framework will fail.
merged as 2160c09dd4f678c5f2f8e730945be637210b39de