瀏覽代碼

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

master^2
Eugen Rochko 4 年之前
committed by GitHub
父節點
當前提交
bfca58d137
沒有發現已知的金鑰在資料庫的簽署中 GPG Key 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)


Loading…
取消
儲存