Merge pull request #6162 from adullact/6161_fix_graphql-validate-blob

Correction d'un test de l'API GraphQL (#6162)
This commit is contained in:
Pierre de La Morinerie 2021-05-04 11:35:19 +02:00 committed by GitHub
commit 4eadf48040
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,8 @@ module Mutations
def validate_blob(blob_id) def validate_blob(blob_id)
begin begin
blob = ActiveStorage::Blob.find_signed(blob_id) blob = ActiveStorage::Blob.find_signed(blob_id)
raise ActiveSupport::MessageVerifier::InvalidSignature if blob.nil?
# open downloads the file and checks its hash # open downloads the file and checks its hash
blob.open { |f| } blob.open { |f| }
true true