diff options
author | Drew Blessing <drew@blessing.io> | 2016-01-15 14:02:55 +0000 |
---|---|---|
committer | Drew Blessing <drew@blessing.io> | 2016-01-15 14:02:55 +0000 |
commit | 4bc7d6e3c16c0a8e1ea19218de09653daf744ecd (patch) | |
tree | af2c079ebb86de29e95fb6d1d2a9ff78e7069888 | |
parent | 03604b39eb043ca81eed6f3192abe5eef7cd06be (diff) | |
parent | df8776f480eeb81245f338f85998b93d11f833a1 (diff) | |
download | gitlab-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.rb | 2 |
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}" |