From 7d8c152aaf2ed1ebb82ab429b0ab42184fee602a Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 11 May 2021 13:17:48 +0000 Subject: [PATCH] Check the start of the string --- src/Module/BaseApi.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Module/BaseApi.php b/src/Module/BaseApi.php index 9e7ee38365..f798320262 100644 --- a/src/Module/BaseApi.php +++ b/src/Module/BaseApi.php @@ -179,7 +179,7 @@ class BaseApi extends BaseModule private static function checkBearer(string $authorization) { - return(strpos($authorization, 'Bearer ') !== false); + return (substr($authorization, 0, 7) == 'Bearer '); } private static function getUserByBearer(string $authorization) -- 2.39.2