From 9b0cce9c0de6e5c738e816b31ebf0c4f42211b9c Mon Sep 17 00:00:00 2001 From: David Remer Date: Thu, 19 Dec 2024 14:59:35 +0200 Subject: [PATCH] Skip permission-callback scan for the line The endpoint container can only return a Endpoint instance and checkPermissions returns always a boolean. The QIT check therefore is a false positive [MAILPOET-6398] --- mailpoet/lib/API/REST/API.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailpoet/lib/API/REST/API.php b/mailpoet/lib/API/REST/API.php index a6cfd69100..f2d5b63231 100644 --- a/mailpoet/lib/API/REST/API.php +++ b/mailpoet/lib/API/REST/API.php @@ -72,7 +72,7 @@ class API { }, 'permission_callback' => function () use ($endpointClass) { $endpoint = $this->endpointContainer->get($endpointClass); - return $endpoint->checkPermissions(); + return $endpoint->checkPermissions(); // nosemgrep: scanner.php.wp.security.rest-route.permission-callback.incorrect-return }, 'args' => $schema, ]);