mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 07:06:30 +00:00
Validate dns better (#1221)
This commit is contained in:
parent
b5ed6c586a
commit
9c2c95757d
@ -51,7 +51,8 @@ UUID_MATCH = vol.Match(r"^[0-9a-f]{32}$")
|
|||||||
SHA256 = vol.Match(r"^[0-9a-f]{64}$")
|
SHA256 = vol.Match(r"^[0-9a-f]{64}$")
|
||||||
TOKEN = vol.Match(r"^[0-9a-f]{32,256}$")
|
TOKEN = vol.Match(r"^[0-9a-f]{32,256}$")
|
||||||
LOG_LEVEL = vol.In(["debug", "info", "warning", "error", "critical"])
|
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):
|
def validate_repository(repository):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user