mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-12-24 07:37:04 +00:00
clean strings before comparing
This commit is contained in:
parent
6be8ae1e4b
commit
e928b915f4
@ -154,7 +154,7 @@ def build_zone(domain, all_domains, additional_records, www_redirect_domains, en
|
|||||||
if os.path.exists("/etc/usehiddenmasterdns") and len(secondary_ns_list) > 1:
|
if os.path.exists("/etc/usehiddenmasterdns") and len(secondary_ns_list) > 1:
|
||||||
with open("/etc/usehiddenmasterdns") as f:
|
with open("/etc/usehiddenmasterdns") as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if line == domain or line == "usehiddenmasterdns":
|
if line.strip() == domain or line.strip() == "usehiddenmasterdns":
|
||||||
useHiddenMaster = True
|
useHiddenMaster = True
|
||||||
break
|
break
|
||||||
|
|
||||||
@ -518,7 +518,7 @@ $TTL {defttl} ; default time to live
|
|||||||
if os.path.exists("/etc/forceshortdnsttl"):
|
if os.path.exists("/etc/forceshortdnsttl"):
|
||||||
with open("/etc/forceshortdnsttl") as f:
|
with open("/etc/forceshortdnsttl") as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if line == domain or line == "forceshortdnsttl":
|
if line.strip() == domain or line.strip() == "forceshortdnsttl":
|
||||||
# Override the ttl values
|
# Override the ttl values
|
||||||
p_defttl = "5m"
|
p_defttl = "5m"
|
||||||
p_refresh = "30m"
|
p_refresh = "30m"
|
||||||
@ -537,7 +537,7 @@ $TTL {defttl} ; default time to live
|
|||||||
if os.path.exists("/etc/usehiddenmasterdns") and len(secondary_ns_list) > 1:
|
if os.path.exists("/etc/usehiddenmasterdns") and len(secondary_ns_list) > 1:
|
||||||
with open("/etc/usehiddenmasterdns") as f:
|
with open("/etc/usehiddenmasterdns") as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if line == domain or line == "usehiddenmasterdns":
|
if line.strip() == domain or line.strip() == "usehiddenmasterdns":
|
||||||
primary_dns = secondary_ns_list[0]
|
primary_dns = secondary_ns_list[0]
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user