mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 16:02:03 +02:00
Strip and downcase domain name before processing
This commit is contained in:
parent
4659aa0cba
commit
35d836531e
6 changed files with 25 additions and 10 deletions
|
@ -167,13 +167,13 @@ module Epp::DomainsHelper
|
|||
|
||||
## SHARED
|
||||
def find_domain(secure = { secure: true })
|
||||
domain = Epp::EppDomain.find_by(name: @ph[:name])
|
||||
domain = Epp::EppDomain.find_by(name: @ph[:name].strip.downcase)
|
||||
|
||||
unless domain
|
||||
epp_errors << {
|
||||
code: '2303',
|
||||
msg: I18n.t('errors.messages.epp_domain_not_found'),
|
||||
value: { obj: 'name', val: @ph[:name] }
|
||||
value: { obj: 'name', val: @ph[:name].strip.downcase }
|
||||
}
|
||||
return nil
|
||||
end
|
||||
|
@ -182,7 +182,7 @@ module Epp::DomainsHelper
|
|||
epp_errors << {
|
||||
code: '2302',
|
||||
msg: I18n.t('errors.messages.domain_exists_but_belongs_to_other_registrar'),
|
||||
value: { obj: 'name', val: @ph[:name] }
|
||||
value: { obj: 'name', val: @ph[:name].strip.downcase }
|
||||
}
|
||||
return nil
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue