소스 검색

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.
master
Renato "Lond" Cerqueira 5 년 전
committed by Eugen Rochko
부모
커밋
e1ec3a9f09
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      app/services/verify_link_service.rb

+ 1
- 1
app/services/verify_link_service.rb 파일 보기

@@ -10,7 +10,7 @@ class VerifyLinkService < BaseService
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


불러오는 중...
취소
저장