Fix #2221 - Catch OpenSSL exceptions when loading remote avatars/headers/attachments Don't strip "rel" attribute from <a> tags when sanitizing (microformats)
This commit is contained in:
@ -34,7 +34,7 @@ module AccountAvatar
|
||||
|
||||
self.avatar = URI.parse(parsed_url.to_s)
|
||||
self[:avatar_remote_url] = url
|
||||
rescue OpenURI::HTTPError => e
|
||||
rescue OpenURI::HTTPError, OpenSSL::SSL::SSLError, Paperclip::Errors::NotIdentifiedByImageMagickError => e
|
||||
Rails.logger.debug "Error fetching remote avatar: #{e}"
|
||||
end
|
||||
end
|
||||
|
@ -34,7 +34,7 @@ module AccountHeader
|
||||
|
||||
self.header = URI.parse(parsed_url.to_s)
|
||||
self[:header_remote_url] = url
|
||||
rescue OpenURI::HTTPError => e
|
||||
rescue OpenURI::HTTPError, OpenSSL::SSL::SSLError, Paperclip::Errors::NotIdentifiedByImageMagickError => e
|
||||
Rails.logger.debug "Error fetching remote header: #{e}"
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user