Skip to content

Commit b118d8e

Browse files
renatolondkedamaDQ
authored andcommitted
Rescue SSL error in verify link service (mastodon#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.
1 parent daeb535 commit b118d8e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/services/verify_link_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def call(field)
1010
return unless link_back_present?
1111

1212
field.mark_verified!
13-
rescue HTTP::Error, Addressable::URI::InvalidURIError, Mastodon::HostValidationError, Mastodon::LengthValidationError => e
13+
rescue OpenSSL::SSL::SSLError, HTTP::Error, Addressable::URI::InvalidURIError, Mastodon::HostValidationError, Mastodon::LengthValidationError => e
1414
Rails.logger.debug "Error fetching link #{@url}: #{e}"
1515
nil
1616
end

0 commit comments

Comments
 (0)