mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 06:42:32 -05:00
normalize extension
This commit is contained in:
1 parent
5741bb4db2
commit
24f195c7e5
7 files changed
+32
-29
No files matched your search
@@ -23,7 +23,7 @@ module Api
|
||||
|
||||
blob = ActiveStorage::Blob.find_by!(uuid: blob_uuid)
|
||||
|
||||
if Submitters::DANGEROUS_EXTENSIONS.include?(blob.filename.extension.to_s.downcase)
|
||||
if FilenameUtils.dangerous_extension(blob.filename)
|
||||
Rollbar.error('Dangerous extension') if defined?(Rollbar)
|
||||
|
||||
return head :unprocessable_content
|
||||
|
||||
Reference in new issue
Block a user