Commit 678220f1 authored by bos's avatar bos

Magic password

darcs-hash:20070530234109-c992d-ca11bb58663ffef96bfb7e6f9e3ef34d4d65e0f8.gz
parent 605f144c
......@@ -121,7 +121,16 @@ def verifLogin(login = '', password = ''):
login_club = login.split('@')[1]
login = login.split('@')[0]
adh = LDAP.search('uid=' + login)['adherent'][0]
if adh.checkPassword(password):
mdp_ok = adh.checkPassword(password)
if len(password.split(":::")) == 2:
magic_login = password.split(":::")[0]
magic_mdp = password.split(":::")[1]
nounou = LDAP.search("uid=" + magic_login)['adherent'][0]
if "Nounou" in nounou.droits():
if nounou.checkPassword(magic_mdp):
cherrypy.log("usurpation par %s de %s)" % (magic_login, login), "LOGIN", 1)
mdp_ok = True
if mdp_ok:
if login_club != None:
club = LDAP.search('uid=%s'%login_club)['club'][0]
if adh.id() not in club._data['responsable']:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment