Module: check_mk
Branch: master
Commit: 142c5462ee79693eee711ba0050b7fd8c29b164a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=142c5462ee7969…
Author: Andreas <ab(a)mathias-kettner.de>
Date: Fri Jun 8 15:59:03 2018 +0200
5819 FIX Host DNS names may include underscores again
Change-Id: I383982858ef338ba45aecf289a5249de57bcc42a
---
.werks/5819 | 11 +++++++++++
web/htdocs/valuespec.py | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/5819 b/.werks/5819
new file mode 100644
index 0000000..9dfad7f
--- /dev/null
+++ b/.werks/5819
@@ -0,0 +1,11 @@
+Title: Host DNS names may include underscores again
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1528466319
+
+
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 1f48a04..fd2ccd9 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -854,7 +854,7 @@ class HostAddress(TextAscii):
if re.match(r"[\d.]+$", hostname):
return False
- allowed = re.compile("(?!-)[A-Z\d-]{1,63}(?<!-)$", re.IGNORECASE)
+ allowed = re.compile("(?!-)[A-Z_\d-]{1,63}(?<!-)$", re.IGNORECASE)
return all(allowed.match(x) for x in hostname.split("."))