gearheads
/
mastodon
Archived
2
0
Fork 0

Rescue SSL error in verify link service (#9914)

If the first link to be verified contains a rel=me link with a SSL
error, the VerifyAccountLinksWorker will fail and not try the following
links. This rescues the SSL error when fetching the link, avoiding this
issue.
gh/stable
Renato "Lond" Cerqueira 2019-01-24 15:38:18 +01:00 committed by Eugen Rochko
parent c87863bdd1
commit e1ec3a9f09
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ class VerifyLinkService < BaseService
return unless link_back_present? return unless link_back_present?
field.mark_verified! field.mark_verified!
rescue HTTP::Error, Addressable::URI::InvalidURIError, Mastodon::HostValidationError, Mastodon::LengthValidationError => e rescue OpenSSL::SSL::SSLError, HTTP::Error, Addressable::URI::InvalidURIError, Mastodon::HostValidationError, Mastodon::LengthValidationError => e
Rails.logger.debug "Error fetching link #{@url}: #{e}" Rails.logger.debug "Error fetching link #{@url}: #{e}"
nil nil
end end