From b9df7a2257f49c4aed5aacba407e4dd8592086a3 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Wed, 5 Jun 2019 16:43:40 +1000 Subject: [PATCH] FIX: if favicon is missing due to bad url we would return a 500 on favicons This ensures that the error logging does not corrupt the cache --- app/controllers/static_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/static_controller.rb b/app/controllers/static_controller.rb index 7d6d37d2a3f..7c69db5ef26 100644 --- a/app/controllers/static_controller.rb +++ b/app/controllers/static_controller.rb @@ -143,6 +143,7 @@ class StaticController < ApplicationController rescue => e AdminDashboardData.add_problem_message('dashboard.bad_favicon_url', 1800) Rails.logger.warn("Failed to fetch faivcon #{favicon.url}: #{e}\n#{e.backtrace}") + "" ensure file&.unlink end