mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-08 18:48:22 +01:00
Debug v22
This commit is contained in:
@@ -124,7 +124,7 @@ class DolibarrApiAccess implements iAuthenticate
|
|||||||
$api_key = preg_replace('/^Bearer\s+/i', '', empty($headers['Authorization']) ? '' : $headers['Authorization']);
|
$api_key = preg_replace('/^Bearer\s+/i', '', empty($headers['Authorization']) ? '' : $headers['Authorization']);
|
||||||
};
|
};
|
||||||
|
|
||||||
$api_key = dol_string_nounprintableascii($api_key);
|
$api_key = dol_string_nounprintableascii($api_key, 1);
|
||||||
|
|
||||||
if (preg_match('/^dolcrypt:/i', $api_key)) {
|
if (preg_match('/^dolcrypt:/i', $api_key)) {
|
||||||
throw new RestException(503, 'Bad value for the API key. An API key should not start with dolcrypt:');
|
throw new RestException(503, 'Bad value for the API key. An API key should not start with dolcrypt:');
|
||||||
|
|||||||
Reference in New Issue
Block a user