git-svn-id: http://svn.redmine.org/redmine/trunk@20253 e93f8b46-1217-0410-a6f0-8f06a7374b81tags/4.2.0
@@ -207,6 +207,7 @@ class AttachmentsController < ApplicationController | |||
@attachment = Attachment.find(params[:id]) | |||
# Show 404 if the filename in the url is wrong | |||
raise ActiveRecord::RecordNotFound if params[:filename] && params[:filename] != @attachment.filename | |||
@project = @attachment.project | |||
rescue ActiveRecord::RecordNotFound | |||
render_404 |