mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-24 20:33:11 +00:00
Fix issue #182
This commit is contained in:
parent
d7c2b2f5e8
commit
6d1828cbe5
1 changed files with 5 additions and 1 deletions
|
@ -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…
Reference in a new issue