diff options
author | Simon L <szaimen@e.mail.de> | 2022-11-13 18:26:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-13 18:26:07 +0100 |
commit | 80040cb65905ad46288eeafc55587cc62e9d8727 (patch) | |
tree | 075de76f0f9cf6d0adef697c16981ff38d7b7945 | |
parent | b4b206c26948157f99af2eb35ab442ac9e9b4a01 (diff) | |
parent | d4f9b8286afa3787b5ac0240198667b2376a3521 (diff) | |
download | nextcloud-server-80040cb65905ad46288eeafc55587cc62e9d8727.tar.gz nextcloud-server-80040cb65905ad46288eeafc55587cc62e9d8727.zip |
Merge pull request #35113 from nextcloud/backport/35015/stable24
[stable24] Appropriate length check in Notification.php
-rw-r--r-- | lib/private/Notification/Notification.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Notification/Notification.php b/lib/private/Notification/Notification.php index 3e5cf1d6934..add4029b616 100644 --- a/lib/private/Notification/Notification.php +++ b/lib/private/Notification/Notification.php @@ -197,12 +197,12 @@ class Notification implements INotification { * @since 8.2.0 - 9.0.0: Type of $id changed to string */ public function setObject(string $type, string $id): INotification { - if ($type === '' || isset($type[64])) { + if ($type === '' || mb_strlen($type) > 64) { throw new \InvalidArgumentException('The given object type is invalid'); } $this->objectType = $type; - if ($id === '' || isset($id[64])) { + if ($id === '' || mb_strlen($id) > 64) { throw new \InvalidArgumentException('The given object id is invalid'); } $this->objectId = $id; |