summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRubén Dávila <rdavila84@gmail.com>2016-01-13 17:03:24 -0500
committerRubén Dávila <rdavila84@gmail.com>2016-01-13 17:03:24 -0500
commitdf8776f480eeb81245f338f85998b93d11f833a1 (patch)
treeaa1d661d1f49b3aa4da69f16eb60d95a93dddb85
parent0e344aa2299d2f6911282de5d4808c70d658d372 (diff)
downloadgitlab-ce-df8776f480eeb81245f338f85998b93d11f833a1.tar.gz
Consider that URL can end with '/' before redirecting. #7975issue_7975
-rw-r--r--app/controllers/application_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 81cb1367e2c..bf99b2e777d 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -115,7 +115,7 @@ class ApplicationController < ActionController::Base
# localhost/group/project
#
if id =~ /\.git\Z/
- redirect_to request.original_url.gsub(/\.git\Z/, '') and return
+ redirect_to request.original_url.gsub(/\.git\/?\Z/, '') and return
end
project_path = "#{namespace}/#{id}"