From fae0093b51b2dae6e02369b65552ddecd5f6ef7f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Jun 2025 15:47:49 +0200 Subject: [PATCH] Debug v22 --- htdocs/api/class/api_access.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php index c7c92f9514d..6a81b2e5975 100644 --- a/htdocs/api/class/api_access.class.php +++ b/htdocs/api/class/api_access.class.php @@ -124,7 +124,7 @@ class DolibarrApiAccess implements iAuthenticate $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)) { throw new RestException(503, 'Bad value for the API key. An API key should not start with dolcrypt:');