mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-11 13:34:50 -05:00
Ensure SECURITY_PASSWORD_SALT is set to something when initialising (to avoid errors, prior to being set to the 'real' value). Fixes #1871
This commit is contained in:
@@ -437,6 +437,8 @@ Exiting...""" % (version.value))
|
|||||||
config.SECRET_KEY = base64.urlsafe_b64encode(os.urandom(32))
|
config.SECRET_KEY = base64.urlsafe_b64encode(os.urandom(32))
|
||||||
config.SECURITY_PASSWORD_SALT = 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)
|
directory = os.path.dirname(config.SQLITE_PATH)
|
||||||
if not os.path.exists(directory):
|
if not os.path.exists(directory):
|
||||||
os.makedirs(directory, int('700', 8))
|
os.makedirs(directory, int('700', 8))
|
||||||
|
|||||||
Reference in New Issue
Block a user