From 3f172b91c58b7f0016ae64a59dbccfad59c5afaa Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Tue, 12 Mar 2024 18:45:05 -0700 Subject: [PATCH] Oops, fix redirect to item thumbnail This `.gif` format is used in the items list "export to petpage" feature, as the image URL for items whose URLs are known to contain blocked words that prevent them from being used in petpages. But when doing some Rails upgrade long ago, we didn't notice the new security feature that blocks redirects to other sites without a special flag being set. It was triggering 500 errors, oops. Now, we set the flag! --- app/controllers/items_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb index 955e8f30..9b59e604 100644 --- a/app/controllers/items_controller.rb +++ b/app/controllers/items_controller.rb @@ -86,7 +86,7 @@ class ItemsController < ApplicationController format.gif do expires_in 1.month - redirect_to @item.thumbnail_url + redirect_to @item.thumbnail_url, allow_other_host: true end end end