Respond with 404 Not Found for non-existent tags

Non-existent tags should be handled with 404 Not Found.
This commit is contained in:
Linus G Thiel 2016-10-05 19:31:33 +02:00
parent 6b9671388d
commit ff378e19e6
2 changed files with 2 additions and 3 deletions

View File

@ -1,6 +1,7 @@
Please view this file on the master branch, on stable branches it's out of date.
v 8.13.0 (unreleased)
- Respond with 404 Not Found for non-existent tags (Linus Thiel)
- Update runner version only when updating contacted_at
- Add link from system note to compare with previous version
- Use gitlab-shell v3.6.2 (GIT TRACE logging)
@ -90,8 +91,6 @@ v 8.12.1
- Fix issue with search filter labels not displaying
v 8.12.0
v 8.12.0 (unreleased)
- Respond with 404 Not Found for non-existent tags
- Update the rouge gem to 2.0.6, which adds highlighting support for JSX, Prometheus, and others. !6251
- Only check :can_resolve permission if the note is resolvable
- Bump fog-aws to v0.11.0 to support ap-south-1 region

View File

@ -20,7 +20,7 @@ class Projects::TagsController < Projects::ApplicationController
def show
@tag = @repository.find_tag(params[:id])
return render_404 if @tag.nil?
return render_404 unless @tag
@release = @project.releases.find_or_initialize_by(tag: @tag.name)
@commit = @repository.commit(@tag.target)