summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2022-11-14 12:49:44 +0100
committerGitHub <noreply@github.com>2022-11-14 12:49:44 +0100
commitea377578ad50809c13e792acfa2bc1bd6b94df24 (patch)
tree741797ce24e825bf09d0680803fe39b5bc7dde62
parent08c19c6b047b0f381c88745ad24008d1906e4355 (diff)
parent6ea4ef952185198e72d7ae7fadb21571ee355c9a (diff)
downloadnextcloud-server-ea377578ad50809c13e792acfa2bc1bd6b94df24.tar.gz
nextcloud-server-ea377578ad50809c13e792acfa2bc1bd6b94df24.zip
Merge pull request #35139 from nextcloud/revert-35015-patch-1
Revert "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 add4029b616..3e5cf1d6934 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 === '' || 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;