root: fix error if secret_key is purely numerical

closes #2099

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-01-18 09:17:12 +01:00
parent ad64d51e85
commit 994c5882ab
1 changed files with 2 additions and 2 deletions

View File

@ -419,7 +419,7 @@ if _ERROR_REPORTING:
set_tag("authentik.build_hash", get_build_hash("tagged"))
set_tag("authentik.env", env)
set_tag("authentik.component", "backend")
set_tag("authentik.uuid", sha512(SECRET_KEY.encode("ascii")).hexdigest()[:16])
set_tag("authentik.uuid", sha512(str(SECRET_KEY).encode("ascii")).hexdigest()[:16])
j_print(
"Error reporting is enabled",
env=CONFIG.y("error_reporting.environment", "customer"),
@ -439,7 +439,7 @@ if not CONFIG.y_bool("disable_startup_analytics", False):
),
},
headers={
"User-Agent": sha512(SECRET_KEY.encode("ascii")).hexdigest()[:16],
"User-Agent": sha512(str(SECRET_KEY).encode("ascii")).hexdigest()[:16],
"Content-Type": "application/json",
},
timeout=5,