mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] move to sh512 because it's fucking year 2017
This commit is contained in:
parent
49d5c70fd6
commit
4419ec10ce
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@ def user_create(auth, username, firstname, lastname, mail, password,
|
||||||
fullname = '%s %s' % (firstname, lastname)
|
fullname = '%s %s' % (firstname, lastname)
|
||||||
char_set = string.ascii_uppercase + string.ascii_lowercase + string.digits + "./"
|
char_set = string.ascii_uppercase + string.ascii_lowercase + string.digits + "./"
|
||||||
salt = ''.join([random.SystemRandom().choice(char_set) for x in range(12)])
|
salt = ''.join([random.SystemRandom().choice(char_set) for x in range(12)])
|
||||||
salt = '$1$' + salt + '$'
|
salt = '$6$' + salt + '$'
|
||||||
user_pwd = '{CRYPT}' + crypt.crypt(str(password), salt)
|
user_pwd = '{CRYPT}' + crypt.crypt(str(password), salt)
|
||||||
attr_dict = {
|
attr_dict = {
|
||||||
'objectClass': ['mailAccount', 'inetOrgPerson', 'posixAccount'],
|
'objectClass': ['mailAccount', 'inetOrgPerson', 'posixAccount'],
|
||||||
|
|
Loading…
Add table
Reference in a new issue