Alex Trofimov 3 лет назад
Родитель
Сommit
3701de0c0b
1 измененных файлов с 1 добавлено и 1 удалено
  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;