ソースを参照

Fix encoding error when checking e-mail MX records (#11696)

master^2
Eugen Rochko 4年前
committed by GitHub
コミット
bfca58d137
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: 4AEE18F83AFDEB23
1個のファイルの変更3行の追加0行の削除
  1. +3
    -0
      app/validators/email_mx_validator.rb

+ 3
- 0
app/validators/email_mx_validator.rb ファイルの表示

@@ -14,6 +14,7 @@ class EmailMxValidator < ActiveModel::Validator

return true if domain.nil?

domain = TagManager.instance.normalize_domain(domain)
hostnames = []
ips = []

@@ -29,6 +30,8 @@ class EmailMxValidator < ActiveModel::Validator
end

ips.empty? || on_blacklist?(hostnames + ips)
rescue Addressable::URI::InvalidURIError
true
end

def on_blacklist?(values)


読み込み中…
キャンセル
保存