mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 02:05:57 +02:00
Validate expiry absolute on keyrelay
This commit is contained in:
parent
ab6e90e407
commit
f8ef86dcd5
2 changed files with 12 additions and 0 deletions
|
@ -32,6 +32,17 @@ module Epp::KeyrelayHelper
|
|||
}
|
||||
end
|
||||
|
||||
begin
|
||||
abs_datetime = parsed_frame.css('absolute').text
|
||||
abs_datetime = DateTime.parse(abs_datetime) if abs_datetime.present?
|
||||
rescue => _e
|
||||
epp_errors << {
|
||||
code: '2005',
|
||||
msg: I18n.t('unknown_expiry_absolute_pattern'),
|
||||
value: { obj: 'expiry_absolute', val: abs_datetime }
|
||||
}
|
||||
end
|
||||
|
||||
epp_errors.empty?
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue