From d248012d8be59bd3e9da71038f53f627f137f6a8 Mon Sep 17 00:00:00 2001 From: Chris Caron Date: Thu, 4 Nov 2021 19:42:45 -0400 Subject: [PATCH] Single alpha characters for subdomains still identify as a valid hostname (#475) --- apprise/utils.py | 5 +++-- test/test_utils.py | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apprise/utils.py b/apprise/utils.py index 137fcb45..b08462c9 100644 --- a/apprise/utils.py +++ b/apprise/utils.py @@ -246,9 +246,10 @@ def is_hostname(hostname, ipv4=True, ipv6=True, underscore=True): # being able to address services in other stacks, we also allow # underscores in hostnames (if flag is set accordingly) # - labels can not exceed 63 characters + # - allow single character alpha characters allowed = re.compile( - r'^[a-z0-9][a-z0-9_-]{1,62}(?