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