diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 9463049668..70fbe0ea96 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -598,7 +598,7 @@ App::post('/v1/projects/:projectId/webhooks') throw new Exception('Project not found', 404); } - $security = ($security === '1' || $security === 'true' || $security === 1 || $security === true); + $security = (bool) filter_var($security, FILTER_VALIDATE_BOOLEAN); $webhook = new Document([ '$id' => $dbForConsole->getId(),