From 59daf777e8cd16ad94d05e1927abb629ed1112e5 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Thu, 9 May 2013 17:20:13 +0200 Subject: [PATCH] regex pour les noms de machine RFC-compliant --- attributs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attributs.py b/attributs.py index 7b462a8..7c47e11 100644 --- a/attributs.py +++ b/attributs.py @@ -509,7 +509,7 @@ class dnsAttr(Attr): def parse_value(self, val): val = val.lower() name, _ = val.split('.', 1) - if not re.match('[a-z][-_a-z0-9]+', name): + if not re.match('[a-z](-*[a-z0-9]+)*', name): raise ValueError("Nom d'hote invalide %r" % val) self.value = val