diff options
author | Martin Kosek <mkosek@redhat.com> | 2012-02-03 10:01:27 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-02-03 16:24:54 +0100 |
commit | e41282fbc693e24535956c8822786e9e0bc3e8b4 (patch) | |
tree | 8a18c374354ea0e2653486129363fc18ce2ec354 /ipalib/plugins/dns.py | |
parent | 2a667d94ec1ad8834f79e12b6e55745deca1cd4d (diff) | |
download | freeipa.git-e41282fbc693e24535956c8822786e9e0bc3e8b4.tar.gz freeipa.git-e41282fbc693e24535956c8822786e9e0bc3e8b4.tar.xz freeipa.git-e41282fbc693e24535956c8822786e9e0bc3e8b4.zip |
Fix TXT record parsing
TXT record validation fails to parse the record if it contains
spaces. Standard DNS part parser uses a space to divide record
parts. A special parser thus need to be implemented for this RR
type.
https://fedorahosted.org/freeipa/ticket/2306
Diffstat (limited to 'ipalib/plugins/dns.py')
-rw-r--r-- | ipalib/plugins/dns.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py index da4934fc..d51c2c30 100644 --- a/ipalib/plugins/dns.py +++ b/ipalib/plugins/dns.py @@ -1003,6 +1003,10 @@ class TXTRecord(DNSRecord): ), ) + def _get_part_values(self, value): + # ignore any space in TXT record + return (value,) + _dns_records = ( ARecord(), AAAARecord(), @@ -1536,6 +1540,8 @@ class dnsrecord(LDAPObject): u'dnsdata' : dnsvalue } values = param._get_part_values(dnsvalue) + if values is None: + continue for val_id, val in enumerate(values): if val is not None: dnsentry[parts_params[val_id].name] = val |