Permalink
Browse files

git fetching over http could access the wrong repository.

Access the repository using the user+repo combination not just the
repository name otherwise it will simply go to the first one
the was created with the repository name which might not be the
one that is wanted.
  • Loading branch information...
1 parent dbdb6ed commit ddd8039e31d00347510db1324e148cc8956d77ec @icefox committed May 6, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 web/app/controllers/repositories_controller.rb
View
4 web/app/controllers/repositories_controller.rb
@@ -30,8 +30,8 @@ def raw
end
def httpgit
- @repository = Repository.find_by_name(params[:repo])
- return if !@repository || !@repository.public
+ return if !find_repository
+ return if !@repository.public
@path = ''
@path = params[:path].join('/') if params[:path]

0 comments on commit ddd8039

Please sign in to comment.