Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2022-11-13 20:26:07 +0300
committerGitHub <noreply@github.com>2022-11-13 20:26:07 +0300
commit80040cb65905ad46288eeafc55587cc62e9d8727 (patch)
tree075de76f0f9cf6d0adef697c16981ff38d7b7945
parentb4b206c26948157f99af2eb35ab442ac9e9b4a01 (diff)
parentd4f9b8286afa3787b5ac0240198667b2376a3521 (diff)
Merge pull request #35113 from nextcloud/backport/35015/stable24stable24
[stable24] Appropriate length check in Notification.php
-rw-r--r--lib/private/Notification/Notification.php4
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;