Ensure SECURITY_PASSWORD_SALT is set to something when initialising (to avoid errors, prior to being set to the 'real' value). Fixes #1871

pull/3/head
Ashesh Vashi 2016-10-19 14:04:07 +01:00 committed by Dave Page
parent b17eb15742
commit 19df1e3f4b
1 changed files with 2 additions and 0 deletions

View File

@ -437,6 +437,8 @@ Exiting...""" % (version.value))
config.SECRET_KEY = base64.urlsafe_b64encode(os.urandom(32))
config.SECURITY_PASSWORD_SALT = base64.urlsafe_b64encode(os.urandom(32))
app.config.from_object(config)
directory = os.path.dirname(config.SQLITE_PATH)
if not os.path.exists(directory):
os.makedirs(directory, int('700', 8))