summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew Blessing <drew@blessing.io>2016-01-15 14:02:55 +0000
committerDrew Blessing <drew@blessing.io>2016-01-15 14:02:55 +0000
commit4bc7d6e3c16c0a8e1ea19218de09653daf744ecd (patch)
treeaf2c079ebb86de29e95fb6d1d2a9ff78e7069888
parent03604b39eb043ca81eed6f3192abe5eef7cd06be (diff)
parentdf8776f480eeb81245f338f85998b93d11f833a1 (diff)
downloadgitlab-ce-4bc7d6e3c16c0a8e1ea19218de09653daf744ecd.tar.gz
Merge branch 'issue_7975' into 'master'
Consider that URL can end with '/' before redirecting. Closes #7975 See merge request !2416
-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}"