Skip to content

Commit 73ee2b3

Browse files
committed
Fix #741
1 parent 5a84326 commit 73ee2b3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

puppetboard/utils.py

+6
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ def check_secret_key(secret_key_value):
5353
Check if the secret key value is set to a default value, that will stop
5454
being accepted in v5.x of the app.
5555
"""
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+
5662
if secret_key_value.startswith("default-"):
5763
log.warning(
5864
"Leaving SECRET_KEY set to a default value WILL cause issues"

0 commit comments

Comments
 (0)