From e62cfe068aa32408a7eb78a95aa1764b6f432011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 2 Feb 2022 14:44:49 +0100 Subject: [PATCH] fix(daemon): Don't use strip to filter Bearer from auth header Using strip might remove more than what is intended here. --- pantalaimon/daemon.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pantalaimon/daemon.py b/pantalaimon/daemon.py index 68cbb97..f8fa159 100755 --- a/pantalaimon/daemon.py +++ b/pantalaimon/daemon.py @@ -418,7 +418,9 @@ class ProxyDaemon: access_token = request.query.get("access_token", "") if not access_token: - access_token = request.headers.get("Authorization", "").strip("Bearer ") + access_token = request.headers.get("Authorization", "").replace( + "Bearer ", "", 1 + ) return access_token