aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-01-09 16:25:25 +0100
committerJohn Molakvoæ <skjnldsv@protonmail.com>2024-01-15 15:11:57 +0100
commit0b58618712c1158b75e2e93f539a69e2a4a7474a (patch)
tree2f544c26f6bef5c1386056d6e93854399d5e1918
parent25c91e6eea73833bbd44d06e3a36725a64d557c4 (diff)
downloadnextcloud-server-0b58618712c1158b75e2e93f539a69e2a4a7474a.tar.gz
nextcloud-server-0b58618712c1158b75e2e93f539a69e2a4a7474a.zip
Validate rich objects passed to SetupResult
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--lib/public/SetupCheck/SetupResult.php5
1 files changed, 5 insertions, 0 deletions
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);
+ }
}
/**