]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
manager: datamodel: types: hyphen added to IDPattern
authorAleš Mrázek <ales.mrazek@nic.cz>
Mon, 12 Jun 2023 10:06:01 +0000 (12:06 +0200)
committerAleš Mrázek <ales.mrazek@nic.cz>
Thu, 13 Jul 2023 07:50:09 +0000 (09:50 +0200)
manager/knot_resolver_manager/datamodel/types/types.py

index dacac8da8a194f262b1a9525bf89a2381084a92b..1f32ea71f58171e4e48b31830d9570ba70994415 100644 (file)
@@ -128,7 +128,7 @@ class IDPattern(PatternBase):
     Alphanumerical ID for identifying systemd slice.
     """
 
-    _re = re.compile(r"[a-zA-Z0-9]+")
+    _re = re.compile(r"^(?!-)[a-z0-9-]*[a-z0-9]+$")
 
 
 class InterfacePort(StrBase):