This commit is contained in:
Laurent Peuch 2017-08-14 16:49:50 +02:00
parent 4419ec10ce
commit 6c9156c3ae

View file

@ -137,7 +137,7 @@ def user_create(auth, username, firstname, lastname, mail, password,
# Adapt values for LDAP
fullname = '%s %s' % (firstname, lastname)
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(16)])
salt = '$6$' + salt + '$'
user_pwd = '{CRYPT}' + crypt.crypt(str(password), salt)
attr_dict = {