FIX: don't 💥 when 'FastImage.size' has trouble with SSL

This commit is contained in:
Régis Hanol 2018-05-26 00:55:19 +02:00 committed by GitHub
parent 6fc292fef5
commit c91071bb2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@ class CookedPostProcessor
return unless SiteSetting.crawl_images? || Discourse.store.has_been_uploaded?(url) return unless SiteSetting.crawl_images? || Discourse.store.has_been_uploaded?(url)
@size_cache[url] = FastImage.size(absolute_url) @size_cache[url] = FastImage.size(absolute_url)
rescue Zlib::BufError, URI::InvalidURIError, URI::InvalidComponentError rescue Zlib::BufError, URI::InvalidURIError, URI::InvalidComponentError, OpenSSL::SSL::SSLError
# FastImage.size raises BufError for some gifs, leave it. # FastImage.size raises BufError for some gifs, leave it.
end end