Fix for make the system create the password using the more stronger method in system
This commit is contained in:
parent
a39af28089
commit
7fe77d8df3
1 changed files with 5 additions and 3 deletions
|
|
@ -40,16 +40,18 @@ class PasswordField(PhangoField):
|
|||
|
||||
else:
|
||||
|
||||
if crypt.METHOD_SHA512 in crypt.methods:
|
||||
#if crypt.METHOD_SHA512 in crypt.methods:
|
||||
|
||||
salt=crypt.mksalt(crypt.METHOD_SHA512)
|
||||
value=crypt.crypt(value, salt)
|
||||
#salt=crypt.mksalt(crypt.METHOD_SHA512)
|
||||
value=crypt.crypt(value)
|
||||
|
||||
"""
|
||||
else:
|
||||
|
||||
self.txt_error="You need the SHA512 method"
|
||||
self.error=True
|
||||
return ""
|
||||
"""
|
||||
|
||||
return value
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue