diff options
Diffstat (limited to 'activestorage/app/controllers/active_storage')
-rw-r--r-- | activestorage/app/controllers/active_storage/disk_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activestorage/app/controllers/active_storage/disk_controller.rb b/activestorage/app/controllers/active_storage/disk_controller.rb index 7bd641ab9a..652084e822 100644 --- a/activestorage/app/controllers/active_storage/disk_controller.rb +++ b/activestorage/app/controllers/active_storage/disk_controller.rb @@ -61,6 +61,7 @@ class ActiveStorage::DiskController < ActiveStorage::BaseController end def acceptable_content?(token) - token[:content_type] == request.content_type && token[:content_length] == request.content_length + Mime::Type.lookup(request.content_type) == token[:content_type] && + token[:content_length] == request.content_length end end |