From fab3c36f25ed4a42730d88085bd5294b2084a5de Mon Sep 17 00:00:00 2001 From: Lucas Bartholemy Date: Mon, 8 Jan 2024 11:36:17 +0100 Subject: [PATCH] Fixed missing function allow --- docs/CHANGELOG.md | 4 ++++ lib/templates/twig/TwigEngine.php | 1 + module.json | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index e6e9bb09..b76c5389 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +1.10.2 (January 8, 2024) +------------------------ +- Fix: Twig SandboxPolicy Function Whitelist broken + 1.10.1 (January 8, 2024) ------------------------ - Enh: Added "random" to Twig SandboxPolicy diff --git a/lib/templates/twig/TwigEngine.php b/lib/templates/twig/TwigEngine.php index f778bc15..552aa764 100644 --- a/lib/templates/twig/TwigEngine.php +++ b/lib/templates/twig/TwigEngine.php @@ -54,6 +54,7 @@ private function getSecurityPolicy(): ?SecurityPolicy $policy->setAllowedTags($module->enableTwiqSandboxExtensionConfig['allowedTags']); $policy->setAllowedMethods($module->enableTwiqSandboxExtensionConfig['allowedMethods']); $policy->setAllowedFilters($module->enableTwiqSandboxExtensionConfig['allowedFilters']); + $policy->setAllowedFunctions($module->enableTwiqSandboxExtensionConfig['allowedFunctions']); $policy->setAllowedProperties($module->enableTwiqSandboxExtensionConfig['allowedProperties']); return $policy; diff --git a/module.json b/module.json index c1472f8e..3a48809e 100644 --- a/module.json +++ b/module.json @@ -3,7 +3,7 @@ "name": "Custom Pages", "description": "Create custom pages and widgets and share them with your users. Take advantage of a wide range of editing options, including HTML and Markdown.", "keywords": ["pages", "custom", "iframe", "markdown", "link", "navigation", "spaces"], - "version": "1.10.1", + "version": "1.10.2", "homepage": "https://github.com/humhub/custom-pages", "humhub": { "minVersion": "1.14"