Browse Source

Fix issue #182

Fix_Hash_Check_Very_Old_Passwd
Maxime Bombar 7 years ago
committed by chirac
parent
commit
6d1828cbe5
  1. 6
      re2o/login.py

6
re2o/login.py

@ -73,7 +73,11 @@ def hash_password_salt(hashed_password):
if hashed_password.upper().startswith('{CRYPT}'): if hashed_password.upper().startswith('{CRYPT}'):
hashed_password = hashed_password[7:] hashed_password = hashed_password[7:]
if hashed_password.startswith('$'): if hashed_password.startswith('$'):
return '$'.join(hashed_password.split('$')[:-1]) res = '$'.join(hashed_password.split('$')[:-1])
if res:
return res
else:
return hashed_password.split('$')[-1]
else: else:
return hashed_password[:2] return hashed_password[:2]
elif hashed_password.upper().startswith('{SSHA}'): elif hashed_password.upper().startswith('{SSHA}'):

Loading…
Cancel
Save