From af0caadb8d9781770399c1804976af4a71d1313b Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Fri, 15 Dec 2017 19:26:53 -0500 Subject: Handle invalid signed blob IDs gracefully --- activestorage/test/controllers/blobs_controller_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activestorage/test/controllers/blobs_controller_test.rb') diff --git a/activestorage/test/controllers/blobs_controller_test.rb b/activestorage/test/controllers/blobs_controller_test.rb index 97177e64c2..9c811df895 100644 --- a/activestorage/test/controllers/blobs_controller_test.rb +++ b/activestorage/test/controllers/blobs_controller_test.rb @@ -8,6 +8,11 @@ class ActiveStorage::BlobsControllerTest < ActionDispatch::IntegrationTest @blob = create_file_blob filename: "racecar.jpg" end + test "showing blob with invalid signed ID" do + get rails_service_blob_url("invalid", "racecar.jpg") + assert_response :not_found + end + test "showing blob utilizes browser caching" do get rails_blob_url(@blob) -- cgit v1.2.3