diff options
Diffstat (limited to 'mitmproxy')
-rw-r--r-- | mitmproxy/net/check.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mitmproxy/net/check.py b/mitmproxy/net/check.py index a19ad6fe..ffb5e163 100644 --- a/mitmproxy/net/check.py +++ b/mitmproxy/net/check.py @@ -2,7 +2,8 @@ import ipaddress import re # Allow underscore in host name -_label_valid = re.compile(br"(?!-)[A-Z\d\-_]{1,63}(?<!-)$", re.IGNORECASE) +# Note: This could be a DNS label, a hostname, a FQDN, or an IP +_label_valid = re.compile(br"[A-Z\d\-_]{1,63}$", re.IGNORECASE) def is_valid_host(host: bytes) -> bool: |