allowedFunctionList, $this->metadata->get('app.advancedReport.allowedFilterFormulaFunctionList', []) ); foreach ($matches[0] as $part) { $part = substr($part, 0, -1); if (in_array($part, $allowedFunctionList)) { continue; } foreach ($this->allowedNamespaceList as $namespace) { if (str_starts_with($part, $namespace . '\\')) { continue 2; } } throw Forbidden::createWithBody( "Not allowed formula in filter.", Body::create() ->withMessageTranslation('notAllowedFormulaInFilter', 'Report') ->encode() ); } } }