anaconda/bugfix-modify-network-hostname-dot-illegal.patch

25 lines
1.0 KiB
Diff
Raw Normal View History

2020-02-06 10:04:54 +08:00
From cde336c5228c4987fc0c4bd9e2611ba655597759 Mon Sep 17 00:00:00 2001
Date: Thu, 6 Feb 2020 09:58:06 +0800
Subject: [PATCH] modify network hostname dot illegal
---
anaconda-29.24.7/pyanaconda/core/regexes.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/core/regexes.py b/pyanaconda/core/regexes.py
index 1f1da07..544d40e 100644
--- a/pyanaconda/core/regexes.py
+++ b/pyanaconda/core/regexes.py
@@ -103,7 +103,7 @@ IPV4_NETMASK_WITH_ANCHORS = re.compile("^" + IPV4_NETMASK_WITHOUT_ANCHORS + "$")
# with a period, but it can end with one.
# This regex uses negative lookahead and lookback assertions to enforce the
# hyphen rules and make it way more confusing
-HOSTNAME_PATTERN_WITHOUT_ANCHORS = r'(?:(?!-)[A-Za-z0-9-]{1,63}(?<!-)(?:\.(?!-)[A-Za-z0-9-]{1,63}(?<!-))*\.?)'
+HOSTNAME_PATTERN_WITHOUT_ANCHORS = r'(?:(?!-)[A-Za-z0-9-]{1,63}(?<!-)(?:\.(?!-)[A-Za-z0-9-]{1,63}(?<!-))*)'
# URL Hostname
# This matches any hostname, IPv4 literal or properly encased IPv6 literal
--
1.8.3.1