python-powerdns icon indicating copy to clipboard operation
python-powerdns copied to clipboard

suggest_zone doesn't handle hyphen properly

Open jschewebbn opened this issue 3 years ago • 0 comments

I have zones "company.com" and "prt.company.com". If I call Server.suggest_zone('foo-prt.company.com.') I get back the zone "prt.company.com" instead of "company.com".

Looking at https://github.com/outini/python-powerdns/blob/master/powerdns/interface.py#L241 it seems that you need to modify it to check for a dot, like so

if r_name.endswith('.' + zone.name):

jschewebbn avatar Mar 09 '22 15:03 jschewebbn