LDAP password cannot be sent hashed

pull/170/head
João Trigo Soares 2019-10-28 17:54:41 +00:00
parent 15c2582630
commit addf7da249
1 changed files with 3 additions and 4 deletions

View File

@ -129,9 +129,7 @@ if form.getvalue('logout'):
sys.exit() sys.exit()
if login is not None and password is not None: if login is not None and password is not None:
USERS = sql.select_users(user=login) USERS = sql.select_users(user=login)
password = funct.get_hash(password)
for users in USERS: for users in USERS:
if users[7] == 0: if users[7] == 0:
@ -142,7 +140,8 @@ if login is not None and password is not None:
if login in users[1]: if login in users[1]:
check_in_ldap(login, password) check_in_ldap(login, password)
else: else:
if login in users[1] and password == users[3]: passwordHashed = funct.get_hash(password)
if login in users[1] and passwordHashed == users[3]:
send_cookie(login) send_cookie(login)
break break
else: else: