diff options
author | Nick Thomas <nick@gitlab.com> | 2018-04-18 19:11:50 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-04-19 12:47:23 +0100 |
commit | 276d4eb80cade01f1d035d849a90009d02ae926d (patch) | |
tree | d68a53a85ebfd9635729a143dbf5ce90bcbf4acd /app | |
parent | 05aa49765f6886e7530fcd30b4925f80013cef41 (diff) | |
download | gitlab-ce-276d4eb80cade01f1d035d849a90009d02ae926d.tar.gz |
Fix specifying a non-default ref when requesting an archive using the legacy URL
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/repositories_controller.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/controllers/projects/repositories_controller.rb b/app/controllers/projects/repositories_controller.rb index 937b0e39cbd..d01f324e6fd 100644 --- a/app/controllers/projects/repositories_controller.rb +++ b/app/controllers/projects/repositories_controller.rb @@ -28,11 +28,12 @@ class Projects::RepositoriesController < Projects::ApplicationController end def assign_archive_vars - @id = params[:id] - - return unless @id - - @ref, @filename = extract_ref(@id) + if params[:id] + @ref, @filename = extract_ref(params[:id]) + else + @ref = params[:ref] + @filename = nil + end rescue InvalidPathError render_404 end |