Commits

Moises Henriquez committed 43cbc7a

Better shadow encryption for user passwords

  • Participants
  • Parent commits afdafb5

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.numbers + "./"
+	salt = "$6$%s$" % ''.join(random.choice(s) for x in range(6))
         return crypt.crypt(passwd, salt)
 
     def create(self):