Digest part in DLV/DS records allows only heaxadecimal characters

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
Martin Basti 2014-06-17 17:52:37 +02:00 committed by Petr Vobornik
parent ee6e634c28
commit 2229e89bbb
2 changed files with 6 additions and 4 deletions

View File

@ -825,7 +825,7 @@ option: DNSNameParam('cname_part_hostname', attribute=False, cli_name='cname_hos
option: CNAMERecord('cnamerecord', attribute=True, cli_name='cname_rec', csv=True, multivalue=True, option_group=u'CNAME Record', required=False)
option: DHCIDRecord('dhcidrecord', attribute=True, cli_name='dhcid_rec', csv=True, multivalue=True, option_group=u'DHCID Record', required=False)
option: Int('dlv_part_algorithm', attribute=False, cli_name='dlv_algorithm', maxvalue=255, minvalue=0, multivalue=False, option_group=u'DLV Record', required=False)
option: Str('dlv_part_digest', attribute=False, cli_name='dlv_digest', multivalue=False, option_group=u'DLV Record', required=False)
option: Str('dlv_part_digest', attribute=False, cli_name='dlv_digest', multivalue=False, option_group=u'DLV Record', pattern='^[0-9a-fA-F]+$', required=False)
option: Int('dlv_part_digest_type', attribute=False, cli_name='dlv_digest_type', maxvalue=255, minvalue=0, multivalue=False, option_group=u'DLV Record', required=False)
option: Int('dlv_part_key_tag', attribute=False, cli_name='dlv_key_tag', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'DLV Record', required=False)
option: DLVRecord('dlvrecord', attribute=True, cli_name='dlv_rec', csv=True, multivalue=True, option_group=u'DLV Record', required=False)
@ -835,7 +835,7 @@ option: StrEnum('dnsclass', attribute=True, cli_name='class', multivalue=False,
option: DNSKEYRecord('dnskeyrecord', attribute=True, cli_name='dnskey_rec', csv=True, multivalue=True, option_group=u'DNSKEY Record', required=False)
option: Int('dnsttl', attribute=True, cli_name='ttl', multivalue=False, required=False)
option: Int('ds_part_algorithm', attribute=False, cli_name='ds_algorithm', maxvalue=255, minvalue=0, multivalue=False, option_group=u'DS Record', required=False)
option: Str('ds_part_digest', attribute=False, cli_name='ds_digest', multivalue=False, option_group=u'DS Record', required=False)
option: Str('ds_part_digest', attribute=False, cli_name='ds_digest', multivalue=False, option_group=u'DS Record', pattern='^[0-9a-fA-F]+$', required=False)
option: Int('ds_part_digest_type', attribute=False, cli_name='ds_digest_type', maxvalue=255, minvalue=0, multivalue=False, option_group=u'DS Record', required=False)
option: Int('ds_part_key_tag', attribute=False, cli_name='ds_key_tag', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'DS Record', required=False)
option: DSRecord('dsrecord', attribute=True, cli_name='ds_rec', csv=True, multivalue=True, option_group=u'DS Record', required=False)
@ -1038,7 +1038,7 @@ option: CNAMERecord('cnamerecord', attribute=True, autofill=False, cli_name='cna
option: Str('delattr*', cli_name='delattr', exclude='webui')
option: DHCIDRecord('dhcidrecord', attribute=True, autofill=False, cli_name='dhcid_rec', csv=True, multivalue=True, option_group=u'DHCID Record', required=False)
option: Int('dlv_part_algorithm', attribute=False, autofill=False, cli_name='dlv_algorithm', maxvalue=255, minvalue=0, multivalue=False, option_group=u'DLV Record', required=False)
option: Str('dlv_part_digest', attribute=False, autofill=False, cli_name='dlv_digest', multivalue=False, option_group=u'DLV Record', required=False)
option: Str('dlv_part_digest', attribute=False, autofill=False, cli_name='dlv_digest', multivalue=False, option_group=u'DLV Record', pattern='^[0-9a-fA-F]+$', required=False)
option: Int('dlv_part_digest_type', attribute=False, autofill=False, cli_name='dlv_digest_type', maxvalue=255, minvalue=0, multivalue=False, option_group=u'DLV Record', required=False)
option: Int('dlv_part_key_tag', attribute=False, autofill=False, cli_name='dlv_key_tag', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'DLV Record', required=False)
option: DLVRecord('dlvrecord', attribute=True, autofill=False, cli_name='dlv_rec', csv=True, multivalue=True, option_group=u'DLV Record', required=False)
@ -1048,7 +1048,7 @@ option: StrEnum('dnsclass', attribute=True, autofill=False, cli_name='class', mu
option: DNSKEYRecord('dnskeyrecord', attribute=True, autofill=False, cli_name='dnskey_rec', csv=True, multivalue=True, option_group=u'DNSKEY Record', required=False)
option: Int('dnsttl', attribute=True, autofill=False, cli_name='ttl', multivalue=False, required=False)
option: Int('ds_part_algorithm', attribute=False, autofill=False, cli_name='ds_algorithm', maxvalue=255, minvalue=0, multivalue=False, option_group=u'DS Record', required=False)
option: Str('ds_part_digest', attribute=False, autofill=False, cli_name='ds_digest', multivalue=False, option_group=u'DS Record', required=False)
option: Str('ds_part_digest', attribute=False, autofill=False, cli_name='ds_digest', multivalue=False, option_group=u'DS Record', pattern='^[0-9a-fA-F]+$', required=False)
option: Int('ds_part_digest_type', attribute=False, autofill=False, cli_name='ds_digest_type', maxvalue=255, minvalue=0, multivalue=False, option_group=u'DS Record', required=False)
option: Int('ds_part_key_tag', attribute=False, autofill=False, cli_name='ds_key_tag', maxvalue=65535, minvalue=0, multivalue=False, option_group=u'DS Record', required=False)
option: DSRecord('dsrecord', attribute=True, autofill=False, cli_name='ds_rec', csv=True, multivalue=True, option_group=u'DS Record', required=False)

View File

@ -1018,6 +1018,8 @@ class DSRecord(DNSRecord):
),
Str('digest',
label=_('Digest'),
pattern=r'^[0-9a-fA-F]+$',
pattern_errmsg=u'only hexadecimal digits are allowed'
),
)