]> git.mxchange.org Git - friendica.git/commitdiff
Check the start of the string
authorMichael <heluecht@pirati.ca>
Tue, 11 May 2021 13:17:48 +0000 (13:17 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 11 May 2021 13:17:48 +0000 (13:17 +0000)
src/Module/BaseApi.php

index 9e7ee38365708f249c22271c6fd3fe6d9598f5fe..f7983202625256a856ce10966ab14328af286348 100644 (file)
@@ -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)