yysun/Git-Web-Access — Issue #5: Incorrect URL for repository if base path ends with '\'
Author: ivan-danilov
Created: 2012-01-10 18:08:48+00:00
State: open

At [this line][1] you are assuming that basePath does not have backslash ('\') in the end and FullPath has. While the latter is correct because there's some non-empty relative path after base path, former is incorrect because user can enter any string she wants.

As the result if basePath has backslash at its end, user would see first char cut. For example if repository is abc.git, user will see URL 'http://localhost/bc.git' which is incorrect.

[1]: https://github.com/yysun/Git-Web-Access/blob/master/GitTools.WebApp/Repository.aspx.cs#L27