diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-01-09 16:25:25 +0100 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-01-11 14:03:55 +0100 |
commit | a78abd84ce7069b30f299abd83ca5d931496b8e8 (patch) | |
tree | dfbf8b0f2096af5a2ac9809f9a4ae3ad3c11c21a /lib/public | |
parent | f34865eb4eb2cebc6379ebb0479c2b2e997a2301 (diff) | |
download | nextcloud-server-a78abd84ce7069b30f299abd83ca5d931496b8e8.tar.gz nextcloud-server-a78abd84ce7069b30f299abd83ca5d931496b8e8.zip |
Validate rich objects passed to SetupResult
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/SetupCheck/SetupResult.php | 5 |
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); + } } /** |