We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a84326 commit 73ee2b3Copy full SHA for 73ee2b3
puppetboard/utils.py
@@ -53,6 +53,12 @@ def check_secret_key(secret_key_value):
53
Check if the secret key value is set to a default value, that will stop
54
being accepted in v5.x of the app.
55
"""
56
+
57
+ # Flask's SECRET_KEY can be bytes or string, but for the check below
58
+ # we need it to be a string
59
+ if type(secret_key_value) is bytes:
60
+ secret_key_value = secret_key_value.decode("utf-8")
61
62
if secret_key_value.startswith("default-"):
63
log.warning(
64
"Leaving SECRET_KEY set to a default value WILL cause issues"
0 commit comments