Directories with dot characters in them fail (such as .git directories) #5

eriknyk opened this Issue May 9, 2011 · 6 comments


None yet
3 participants

eriknyk commented May 9, 2011

mi repos directory have names with dot '.' example my_repo.git, and never works for me


josegonzalez commented May 9, 2011

Do you have a patch?


josegonzalez commented Jul 13, 2011

I believe this has to do with sanitization of urls to ensure people don't try to traverse directories. I'll take a look at this later this weekend if no one else will ;)


lxfontes commented Dec 20, 2011

Going through each entry in config/routes.php and changing:

  •   array('project' => '[\w_-]+')
  •   array('project' => '[\w_-]+(.git)?')

did the trick for me.
(edit: github doesn't seem to like regexes :) .git has a backslash)


josegonzalez commented Dec 20, 2011

Pull request? :)


lxfontes commented Dec 20, 2011

seems there's is some extra work required on Git::blob in order to show the file contents properly. will try to get that going.
Something along the lines:
this would require an PECL extension ( finfo ) to determine the mime type, but I rather not add any dependencies to the code.


josegonzalez commented Aug 21, 2016

I'm no longer maintaining this repository. Pull requests welcome, but I won't be fixing any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment