From c6317f040ec4d75565b35343f5c2d8eda18b17c9 Mon Sep 17 00:00:00 2001 From: Matej Matuska <75834032+matejmatuska@users.noreply.github.com> Date: Mon, 22 Aug 2022 12:31:42 +0200 Subject: [PATCH] Fix bug in regex --- leapp/utils/workarounds/fqdn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leapp/utils/workarounds/fqdn.py b/leapp/utils/workarounds/fqdn.py index 525f7ffe4..1788e1ecc 100644 --- a/leapp/utils/workarounds/fqdn.py +++ b/leapp/utils/workarounds/fqdn.py @@ -6,7 +6,7 @@ def decorate_getfqdn(fn): def wrap(*args, **kwargs): result = fn(*args, **kwargs) # check whether FQDN conforms to standard, see HOSTNAME(7) - pattern = r"^(([a-z0-9]|[a-z0-9\-]*[a-z0-9])\.)*([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])$" + pattern = r"^(([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])\.)*([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])$" if re.match(pattern, result, re.IGNORECASE): return result return 'invalid.hostname'