8
0
Fork 0
mirror of https://gitlab.federez.net/re2o/re2o synced 2024-05-02 15:43:28 +00:00
This commit is contained in:
Maxime Bombar 2018-11-24 16:06:55 +01:00 committed by chirac
parent d7c2b2f5e8
commit 6d1828cbe5

View file

@ -73,7 +73,11 @@ def hash_password_salt(hashed_password):
if hashed_password.upper().startswith('{CRYPT}'):
hashed_password = hashed_password[7:]
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:
return hashed_password[:2]
elif hashed_password.upper().startswith('{SSHA}'):