Replace [ZONE] placeholder with domain_name (#960)

This commit is contained in:
Hidde 2021-10-30 21:24:16 +02:00 committed by GitHub
parent bf83662108
commit f96103db79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,6 +165,8 @@ class Record(object):
for record in submitted_records:
# Format the record name
#
# Translate template placeholders into proper record data
record['record_data'] = record['record_data'].replace('[ZONE]', domain_name)
# Translate record name into punycode (IDN) as that's the only way
# to convey non-ascii records to the dns server
record['record_name'] = record['record_name'].encode('idna').decode()