mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 02:42:26 -05:00
Added some logging up front when the app is initialized to see if
DANGEROUS_SALT and SECRET_KEY are both available and have data in them. Signed-off-by: Cliff Hill <clifford.hill@gsa.gov>
This commit is contained in:
@@ -233,6 +233,14 @@ def create_app(application):
|
||||
)
|
||||
logging.init_app(application)
|
||||
|
||||
import hashlib
|
||||
|
||||
for key in ("SECRET_KEY", "DANGEROUS_SALT"):
|
||||
application.logger.info(
|
||||
f"{key} Length: {len(application.config[key])}; "
|
||||
f"SHA-1: {hashlib.sha1(application.config[key].encode('utf8'), usedforsecurity=False).hexdigest()}"
|
||||
)
|
||||
|
||||
login_manager.login_view = "main.sign_in"
|
||||
login_manager.login_message_category = "default"
|
||||
login_manager.session_protection = None
|
||||
|
||||
Reference in New Issue
Block a user