Skip to content

Commit

Permalink
Fix bug in regex
Browse files Browse the repository at this point in the history
  • Loading branch information
matejmatuska committed Aug 22, 2022
1 parent d18628c commit c6317f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion leapp/utils/workarounds/fqdn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit c6317f0

Please sign in to comment.