mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: validates attachments against current authorized extensions
This commit is contained in:
parent
4f0bdec370
commit
be0c7609f1
3 changed files with 35 additions and 1 deletions
|
@ -635,7 +635,7 @@ module Email
|
|||
# create the upload for the user
|
||||
opts = { for_group_message: options[:is_group_message] }
|
||||
upload = UploadCreator.new(tmp, attachment.filename, opts).create_for(user_id)
|
||||
if upload && upload.errors.empty?
|
||||
if upload&.valid?
|
||||
# try to inline images
|
||||
if attachment.content_type&.start_with?("image/")
|
||||
if raw[attachment.url]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue