From 36ea2748becd25b5c2f6817d0359726140a2adf4 Mon Sep 17 00:00:00 2001 From: Joas Schilling <213943+nickvergessen@users.noreply.github.com> Date: Mon, 14 Nov 2022 11:14:57 +0100 Subject: [PATCH] Revert "[stable24] Appropriate length check in Notification.php" --- lib/private/Notification/Notification.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/Notification/Notification.php b/lib/private/Notification/Notification.php index add4029b61666..3e5cf1d69349a 100644 --- a/lib/private/Notification/Notification.php +++ b/lib/private/Notification/Notification.php @@ -197,12 +197,12 @@ public function getDateTime(): \DateTime { * @since 8.2.0 - 9.0.0: Type of $id changed to string */ public function setObject(string $type, string $id): INotification { - if ($type === '' || mb_strlen($type) > 64) { + if ($type === '' || isset($type[64])) { throw new \InvalidArgumentException('The given object type is invalid'); } $this->objectType = $type; - if ($id === '' || mb_strlen($id) > 64) { + if ($id === '' || isset($id[64])) { throw new \InvalidArgumentException('The given object id is invalid'); } $this->objectId = $id;