fix error

This commit is contained in:
chiu 2021-08-04 20:12:27 +08:00
parent 4843a52134
commit b0abf3d1e1
1 changed files with 1 additions and 1 deletions

View File

@ -497,7 +497,7 @@ class AnnouncementsController < ApplicationController
end
def get_file
@url = request.path
render :text => "Path not allow",:status => 404 and return if @url.match(/\/\.\./)
render :file => "#{Rails.root}/app/views/errors/404.html", :layout => false, :status => :not_found, :content_type => 'text/html' and return if @url.match(/\/\.\./)
begin
file = BulletinFile.find(params[:id])
if File.basename(file.file.path) != URI.decode(params[:f_name])