Skip to content

Commit

Permalink
Rescue SSL error in verify link service (mastodon#9914)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
renatolond authored and hiyuki2578 committed Oct 2, 2019
1 parent 1ada6d1 commit 4a649cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/verify_link_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def call(field)
return unless link_back_present?

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}"
nil
end
Expand Down

0 comments on commit 4a649cc

Please sign in to comment.