diff options
author | George Claghorn <george@basecamp.com> | 2017-07-27 16:52:57 -0400 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2017-07-27 16:52:57 -0400 |
commit | a9091eaa67bd2ebbb4876549ff33a33600276040 (patch) | |
tree | db2b3adedadc9481da2d92150afee376f0c13042 /app/controllers | |
parent | e64e3f14fd255d91ac0aa7a272741df08da82701 (diff) | |
download | rails-a9091eaa67bd2ebbb4876549ff33a33600276040.tar.gz rails-a9091eaa67bd2ebbb4876549ff33a33600276040.tar.bz2 rails-a9091eaa67bd2ebbb4876549ff33a33600276040.zip |
Validate Content-Length
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/active_storage/disk_controller.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/active_storage/disk_controller.rb b/app/controllers/active_storage/disk_controller.rb index 6be88d2857..76377a0f20 100644 --- a/app/controllers/active_storage/disk_controller.rb +++ b/app/controllers/active_storage/disk_controller.rb @@ -45,9 +45,7 @@ class ActiveStorage::DiskController < ActionController::Base ActiveStorage.verifier.verified(params[:encoded_token], purpose: :blob_token) end - # FIXME: Validate Content-Length when we're using integration tests. Controller tests don't - # populate the header properly when a request body is provided. def acceptable_content?(token) - token[:content_type] == request.content_type + token[:content_type] == request.content_type && token[:content_length] == request.content_length end end |