Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix crash in EmailDomainBlockRefreshScheduler (mastodon#17649)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Feb 26, 2022
1 parent a5c24d5 commit 3d60708
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ def perform
if ip?(email_domain_block.domain)
[email_domain_block.domain]
else
dns.getresources(email_domain_block.domain, Resolv::DNS::Resource::IN::A).to_a + dns.getresources(email_domain_block.domain, Resolv::DNS::Resource::IN::AAAA).to_a.map { |resource| resource.address.to_s }
resources = dns.getresources(email_domain_block.domain, Resolv::DNS::Resource::IN::A).to_a + dns.getresources(email_domain_block.domain, Resolv::DNS::Resource::IN::AAAA).to_a
resources.map { |resource| resource.address.to_s }
end
end

Expand Down

0 comments on commit 3d60708

Please sign in to comment.