diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-04-29 23:27:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-29 23:27:03 +0200 |
commit | f6d35ed57d156f4225338a89372c8e83721e46c9 (patch) | |
tree | b83ee4170d73e04438158e4fd05f1b4b344b3c7e /app/validators | |
parent | 7b0fe4aef97c6a5f73a03146b669a415f396799c (diff) |
Remove IP matching from e-mail domain blocks (#18190)
Clear out e-mail domain blocks created from automatically resolved DNS records
Diffstat (limited to 'app/validators')
-rw-r--r-- | app/validators/email_mx_validator.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/validators/email_mx_validator.rb b/app/validators/email_mx_validator.rb index 237ca4c7b..20f2fd37c 100644 --- a/app/validators/email_mx_validator.rb +++ b/app/validators/email_mx_validator.rb @@ -15,7 +15,7 @@ class EmailMxValidator < ActiveModel::Validator if resolved_ips.empty? user.errors.add(:email, :unreachable) - elsif on_blacklist?(resolved_domains, resolved_ips, user.sign_up_ip) + elsif on_blacklist?(resolved_domains, user.sign_up_ip) user.errors.add(:email, :blocked) end end @@ -57,7 +57,7 @@ class EmailMxValidator < ActiveModel::Validator [ips, records] end - def on_blacklist?(domains, resolved_ips, attempt_ip) - EmailDomainBlock.block?(domains, ips: resolved_ips, attempt_ip: attempt_ip) + def on_blacklist?(domains, attempt_ip) + EmailDomainBlock.block?(domains, attempt_ip: attempt_ip) end end |