mirror of
https://github.com/internetee/registry.git
synced 2025-08-12 04:29:33 +02:00
Fix digest field name
This commit is contained in:
parent
22a3f3c1a7
commit
7a647682df
2 changed files with 8 additions and 8 deletions
|
@ -171,18 +171,18 @@ module Epp::DomainsHelper
|
||||||
|
|
||||||
unless domain
|
unless domain
|
||||||
epp_errors << {
|
epp_errors << {
|
||||||
code: '2303',
|
code: '2303',
|
||||||
msg: I18n.t('errors.messages.epp_domain_not_found'),
|
msg: I18n.t('errors.messages.epp_domain_not_found'),
|
||||||
value: { obj: 'name', val: @ph[:name] }
|
value: { obj: 'name', val: @ph[:name] }
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
if domain.registrar != current_epp_user.registrar && secure[:secure] == true
|
if domain.registrar != current_epp_user.registrar && secure[:secure] == true
|
||||||
epp_errors << {
|
epp_errors << {
|
||||||
code: '2302',
|
code: '2302',
|
||||||
msg: I18n.t('errors.messages.domain_exists_but_belongs_to_other_registrar'),
|
msg: I18n.t('errors.messages.domain_exists_but_belongs_to_other_registrar'),
|
||||||
value: { obj: 'name', val: @ph[:name] }
|
value: { obj: 'name', val: @ph[:name] }
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,7 +8,7 @@ class Dnskey < ActiveRecord::Base
|
||||||
validate :validate_protocol
|
validate :validate_protocol
|
||||||
validate :validate_flags
|
validate :validate_flags
|
||||||
|
|
||||||
before_save -> { generate_digest unless digest.present? }
|
before_save -> { generate_digest unless ds_digest.present? }
|
||||||
|
|
||||||
ALGORITHMS = %w(3 5 6 7 8 252 253 254 255)
|
ALGORITHMS = %w(3 5 6 7 8 252 253 254 255)
|
||||||
PROTOCOLS = %w(3)
|
PROTOCOLS = %w(3)
|
||||||
|
@ -61,7 +61,7 @@ class Dnskey < ActiveRecord::Base
|
||||||
|
|
||||||
hex = [domain.name_in_wire_format, flags_hex, protocol_hex, alg_hex, public_key_hex].join
|
hex = [domain.name_in_wire_format, flags_hex, protocol_hex, alg_hex, public_key_hex].join
|
||||||
bin = self.class.hex_to_bin(hex)
|
bin = self.class.hex_to_bin(hex)
|
||||||
self.digest = Digest::SHA256.hexdigest(bin).upcase
|
self.ds_digest = Digest::SHA256.hexdigest(bin).upcase
|
||||||
end
|
end
|
||||||
|
|
||||||
def public_key_hex
|
def public_key_hex
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue