aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2023-12-14 09:09:49 -0800
committerPinapelz <yukais@pinapelz.com>2023-12-14 09:09:49 -0800
commitd38a7cf702554b6814e828b3a6bc4409f2ae432a (patch)
tree6e44b6d49829fca881cabb8c43908305d61ebc3e /api
parent269bbeaada4e6f6d091fee3fff3efebecbb35cb9 (diff)
attempt to fix issues via stripping auth tokens
Diffstat (limited to 'api')
-rw-r--r--api/app.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/app.py b/api/app.py
index 415e13d..5b049ce 100644
--- a/api/app.py
+++ b/api/app.py
@@ -214,7 +214,7 @@ def clear_sessions():
stored_auth = os.environ.get("AUTHORIZATION")
cron_secret = os.environ.get("CRON_SECRET")
print("Checking if " + auth + " matches " + cron_secret)
- if auth != stored_auth or auth != cron_secret:
+ if auth.strip() != stored_auth.strip() or auth.strip() != cron_secret.strip():
return jsonify({"error": "Unauthorized"}), 401
server = create_database_connection()
if server.check_health() is False:
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage