From 9c2c95757df6f70990b81838737719e0aa1d81f6 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 15 Aug 2019 23:48:14 +0200 Subject: [PATCH] Validate dns better (#1221) --- hassio/validate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hassio/validate.py b/hassio/validate.py index 068e64aa1..b45792ecd 100644 --- a/hassio/validate.py +++ b/hassio/validate.py @@ -51,7 +51,8 @@ UUID_MATCH = vol.Match(r"^[0-9a-f]{32}$") SHA256 = vol.Match(r"^[0-9a-f]{64}$") TOKEN = vol.Match(r"^[0-9a-f]{32,256}$") LOG_LEVEL = vol.In(["debug", "info", "warning", "error", "critical"]) -DNS_SERVER_LIST = vol.All([vol.Url()], vol.Length(max=8)) +DNS_URL = vol.Match(r"^dns://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$") +DNS_SERVER_LIST = vol.All([DNS_URL], vol.Length(max=8)) def validate_repository(repository):