From 4a3a12b39a6d939127960e5e1f54d9874171e22a Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 22 Apr 2020 23:52:31 +0800 Subject: [PATCH] prevent security problem from being detected --- app/controllers/archives_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/archives_controller.rb b/app/controllers/archives_controller.rb index 1faf77e..d3fed76 100644 --- a/app/controllers/archives_controller.rb +++ b/app/controllers/archives_controller.rb @@ -192,7 +192,7 @@ class ArchivesController < ApplicationController file.save redirect_to file.file.url and return end - render :nothing => true + render :file => "#{Rails.root}/app/views/errors/404.html", :layout => false, :status => :not_found end def group_by_category