]> source.dussan.org Git - nextcloud-server.git/commitdiff
Revert "Appropriate length check in Notification.php" 35139/head
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>
Mon, 14 Nov 2022 10:14:13 +0000 (11:14 +0100)
committerGitHub <noreply@github.com>
Mon, 14 Nov 2022 10:14:13 +0000 (11:14 +0100)
lib/private/Notification/Notification.php

index add4029b6166613dd28dcba8b9eec87afa2e2f97..3e5cf1d69349a4ddd3a051bfe66e2f28b44d9feb 100644 (file)
@@ -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 === '' || 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;