Browse Source

Merge pull request #399 from pixelart/bugfix/route53-overlapping-zones

[Route53] Make a stricter comparison for matching against zone names
pull/428/head
Emii Khaos 6 years ago
committed by GitHub
parent
commit
d3759a3c00
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      dns_scripts/dns_route53.py

+ 2
- 2
dns_scripts/dns_route53.py View File

@ -32,7 +32,7 @@ for zone in response['HostedZones']:
zone_list[zone['Name']] = zone['Id'] zone_list[zone['Name']] = zone['Id']
for key in sorted(zone_list.iterkeys(), key=len, reverse=True): for key in sorted(zone_list.iterkeys(), key=len, reverse=True):
if key in "{z}.".format(z=fqdn):
if ".{z}".format(z=key) in ".{z}.".format(z=fqdn):
zone_id = zone_list[key] zone_id = zone_list[key]
if zone_id == "": if zone_id == "":
@ -84,4 +84,4 @@ if action == 'UPSERT':
print("Didn't find {f} entry yet, sleeping... ({w}s)".format(f=challenge_fqdn, print("Didn't find {f} entry yet, sleeping... ({w}s)".format(f=challenge_fqdn,
w=waiting)) w=waiting))
time.sleep(10) time.sleep(10)
pass
pass

Loading…
Cancel
Save