Parcourir la source

#4148 Build-in API support

Alex Trofimov il y a 3 ans
Parent
commit
3701de0c0b
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      inc/utils.inc.php

+ 1 - 1
inc/utils.inc.php

@@ -2361,7 +2361,7 @@ function bx_api_check_access()
         }
     }
     elseif ($sAuthHeader && getParam('sys_api_access_by_key')) {
-        if (!BxDolApiQuery::getInstance()->getKey($sAuthHeader)) {
+        if (!BxDolApiQuery::getInstance()->getKey(str_replace('Bearer ', '', $sAuthHeader))) {
             header('HTTP/1.0 403 Forbidden');
             echo json_encode(['status' => 403, 'error' => _t("_Access denied")]);
             exit;