mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 10:16:01 +02:00
Add test & validation to not to register blocked IDN domains via EPP
Fixes https://github.com/internetee/registry/issues/1142#issuecomment-581889350
This commit is contained in:
parent
89cdfe20fc
commit
934033cfbc
2 changed files with 33 additions and 1 deletions
|
@ -33,7 +33,9 @@ class DomainNameValidator < ActiveModel::EachValidator
|
|||
|
||||
def validate_blocked(value)
|
||||
return true unless value
|
||||
return false if BlockedDomain.where(name: value).count.positive?
|
||||
return false if BlockedDomain.where(name: value).any?
|
||||
return false if BlockedDomain.where(name: SimpleIDN.to_unicode(value)).any?
|
||||
|
||||
DNS::Zone.where(origin: value).count.zero?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue