normalize extension

This commit is contained in:
Pete Matsyburka committed 2026-09-21 09:06:25 +03:00
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