Commits

Rodrigo Bistolfi  committed a884e31 Merge

Merged in m0e_lnx/m0e-vinstall (pull request #7)

password encryption fix

  • Participants
  • Parent commits dccf50d, d227932

Comments (0)

Files changed (1)

File vinstall/backend/users.py

 
     def encrypt_password(self, passwd):
         """Return the encrypted password"""
-        s = string.ascii_letters + "./"
-        salt = random.choice(s) + random.choice(s)
+        s = string.ascii_letters + string.digits + "./"
+	salt = "$6$%s$" % ''.join(random.choice(s) for x in range(6))
         return crypt.crypt(passwd, salt)
 
     def create(self):