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:
|
else:
|
||||||
|
|
||||||
if crypt.METHOD_SHA512 in crypt.methods:
|
#if crypt.METHOD_SHA512 in crypt.methods:
|
||||||
|
|
||||||
salt=crypt.mksalt(crypt.METHOD_SHA512)
|
#salt=crypt.mksalt(crypt.METHOD_SHA512)
|
||||||
value=crypt.crypt(value, salt)
|
value=crypt.crypt(value)
|
||||||
|
|
||||||
|
"""
|
||||||
else:
|
else:
|
||||||
|
|
||||||
self.txt_error="You need the SHA512 method"
|
self.txt_error="You need the SHA512 method"
|
||||||
self.error=True
|
self.error=True
|
||||||
return ""
|
return ""
|
||||||
|
"""
|
||||||
|
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue