Commit 9d8d611c authored by Nicolas Delaby's avatar Nicolas Delaby

Encrypt password

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24628 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d078ccbb
...@@ -39,7 +39,10 @@ from DateTime import DateTime ...@@ -39,7 +39,10 @@ from DateTime import DateTime
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
from Acquisition import aq_base from Acquisition import aq_base
from BTrees.OOBTree import OOBTree from BTrees.OOBTree import OOBTree
try:
from AccessControl.AuthEncoding import pw_encrypt
except ImportError:
pw_encrypt = lambda pw:pw
class PasswordTool(BaseTool): class PasswordTool(BaseTool):
""" """
...@@ -190,7 +193,7 @@ class PasswordTool(BaseTool): ...@@ -190,7 +193,7 @@ class PasswordTool(BaseTool):
self.password_request_dict.pop(password_key) self.password_request_dict.pop(password_key)
persons = self.acl_users.erp5_users.getUserByLogin(user_login) persons = self.acl_users.erp5_users.getUserByLogin(user_login)
person = persons[0] person = persons[0]
person._setPassword(password) person._setPassword(pw_encrypt(password))
person.reindexObject() person.reindexObject()
if REQUEST is not None: if REQUEST is not None:
msg = translateString("Password changed.") msg = translateString("Password changed.")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment