mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +03:00
rough check for valid domains
This commit is contained in:
@@ -38,6 +38,9 @@ def process_data(data, file):
|
|||||||
if not "domains" in data:
|
if not "domains" in data:
|
||||||
raise TypeError("no domains found")
|
raise TypeError("no domains found")
|
||||||
for domain in data["domains"]:
|
for domain in data["domains"]:
|
||||||
|
domain = cleanstr(domain)
|
||||||
|
if domain == "" or domain.count(".") < 1:
|
||||||
|
raise TypeError("bad domain: " + domain)
|
||||||
out_domains += " (\"" + domain + "\", &*P" + str(count) + "),\n"
|
out_domains += " (\"" + domain + "\", &*P" + str(count) + "),\n"
|
||||||
comment += domain + ", "
|
comment += domain + ", "
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user