mirror of
https://github.com/retspen/webvirtcloud
synced 2026-03-23 02:54:51 +00:00
Genrate random salts fort the root password
This commit is contained in:
parent
9db1b060a6
commit
748c167def
1 changed files with 1 additions and 1 deletions
|
|
@ -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 = "*"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue