mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-05 13:14:46 +02:00
dockersetup: fix auto-generated passwords
* We can't use # because it can result in part of the password being trimmed off when it gets put in a configuration file. * Similarly, our parsing splits on = so it is unwise to allow as a valid character. * Add uppercase characters for a little more randomisation.
This commit is contained in:
parent
99a86d7e0a
commit
f50f48cf01
|
@ -363,7 +363,7 @@ def setup_https(hostname, http_port, https_port, letsencrypt, cert, cert_key):
|
|||
|
||||
|
||||
def generatepasswords(passwordlength):
|
||||
return ''.join([random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789!@#%^&*-_=+') for i in range(passwordlength)])
|
||||
return ''.join([random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@%^&*-_+') for i in range(passwordlength)])
|
||||
|
||||
def readfile(filename):
|
||||
f = open(filename,'r')
|
||||
|
|
Loading…
Reference in New Issue
Block a user