From 748c167def19eb7c623d41317ab612d4ebd5e9cf Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Tue, 10 May 2016 13:42:48 +0200 Subject: [PATCH] Genrate random salts fort the root password --- instances/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instances/views.py b/instances/views.py index fbd8b34..a119fb5 100644 --- a/instances/views.py +++ b/instances/views.py @@ -289,7 +289,7 @@ def instance(request, compute_id, vname): if 'rootpasswd' in request.POST: passwd = request.POST.get('passwd', '') if passwd: - passwd_hash = crypt.crypt(passwd, '$6$kgPoiREy') + passwd_hash = crypt.crypt(passwd, '$6$%s' % ''.join([choice(letters + digits) for i in xrange(8)])) # if password is empty, disable the root password else: passwd_hash = "*"