From a78abd84ce7069b30f299abd83ca5d931496b8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 9 Jan 2024 16:25:25 +0100 Subject: [PATCH] Validate rich objects passed to SetupResult MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/public/SetupCheck/SetupResult.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/public/SetupCheck/SetupResult.php b/lib/public/SetupCheck/SetupResult.php index 51428a001e0..7d30b8eaff9 100644 --- a/lib/public/SetupCheck/SetupResult.php +++ b/lib/public/SetupCheck/SetupResult.php @@ -26,6 +26,8 @@ declare(strict_types=1); namespace OCP\SetupCheck; +use OCP\RichObjectStrings\IValidator; + /** * @brief This class is used for storing the result of a setup check * @@ -54,6 +56,9 @@ class SetupResult implements \JsonSerializable { private ?array $descriptionParameters = null, private ?string $linkToDoc = null, ) { + if ($description !== null && $descriptionParameters !== null) { + \OCP\Server::get(IValidator::class)->validate($description, $descriptionParameters); + } } /**