feat(security): Enforce secret key for flask application.
This commit is contained in:
parent
e82d830410
commit
1484d678ce
|
@ -89,9 +89,9 @@ def configure_app(app, test_config=None):
|
||||||
)
|
)
|
||||||
|
|
||||||
if "secret_key" not in config["FLASCHENGEIST"]:
|
if "secret_key" not in config["FLASCHENGEIST"]:
|
||||||
logger.warning("No secret key was configured, please configure one for production systems!")
|
logger.critical("No secret key was configured, please configure one for production systems!")
|
||||||
app.config["SECRET_KEY"] = "0a657b97ef546da90b2db91862ad4e29"
|
raise RuntimeError("No secret key was configured")
|
||||||
else:
|
|
||||||
app.config["SECRET_KEY"] = config["FLASCHENGEIST"]["secret_key"]
|
app.config["SECRET_KEY"] = config["FLASCHENGEIST"]["secret_key"]
|
||||||
|
|
||||||
if test_config is not None:
|
if test_config is not None:
|
||||||
|
|
Loading…
Reference in New Issue