raise invalid param

pull/402/merge
Pete Matsyburka 1 month ago
parent 9377766e52
commit 680ab9dbed

@ -14,6 +14,7 @@ module Submitters
UnableToSendCode = Class.new(StandardError) UnableToSendCode = Class.new(StandardError)
InvalidOtp = Class.new(StandardError) InvalidOtp = Class.new(StandardError)
MaliciousFileExtension = Class.new(StandardError) MaliciousFileExtension = Class.new(StandardError)
ArgumentError = Class.new(StandardError)
DANGEROUS_EXTENSIONS = Set.new(%w[ DANGEROUS_EXTENSIONS = Set.new(%w[
exe com bat cmd scr pif vbs vbe js jse wsf wsh msi msp exe com bat cmd scr pif vbs vbe js jse wsf wsh msi msp
@ -133,7 +134,7 @@ module Submitters
filename: file.original_filename, filename: file.original_filename,
content_type: file.content_type) content_type: file.content_type)
else else
ActiveStorage::Blob.find_signed(params[:blob_signed_id]) raise ArgumentError, 'file param is missing'
end end
ActiveStorage::Attachment.create!( ActiveStorage::Attachment.create!(

Loading…
Cancel
Save