From 4e731abada84f24ddef17946b164b99855afdb16 Mon Sep 17 00:00:00 2001 From: glondu Date: Tue, 14 Feb 2006 23:45:01 +0100 Subject: [PATCH] Pour le 4L-Trophy. darcs-hash:20060214224501-68412-66d9afd281f27bff1e804c3b6b156e6d3b713fbb.gz --- gestion/ldap_crans.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 549a103f..3fdd54c4 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -1976,9 +1976,8 @@ class club(base_proprietaire): login = login.lower() if not sre.match('^club-', login): login = 'club-' + login - for l in login: - if l not in string.letters + '-': - raise ValueError('Caractère %s interdit dans le login.' % l) + if not sre.match('^[a-z0-9]*[a-z]+[a-z0-9-]*$', login): + raise ValueError(u'Login incorrect') login = preattr(login)[1] if 'posixAccount' in self._data['objectClass']: