From fe01f75e970bdb14d6c610e7d8d4444e3013469b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 9 Feb 2022 17:50:26 +0100 Subject: [PATCH] Fix API_ENDPOINT_RULES with api of external modules --- htdocs/api/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/index.php b/htdocs/api/index.php index 70aeae96447..da194f12655 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -304,7 +304,7 @@ if (!empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/swagger.json' && foreach ($listofendpoints as $endpointrule) { $tmparray = explode(':', $endpointrule); - if ($classfile == $tmparray[0] && $tmparray[1] == 1) { + if (($classfile == $tmparray[0] || $classfile.'api' == $tmparray[0]) && $tmparray[1] == 1) { $endpointisallowed = true; break; }