summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2022-11-11 17:08:21 +0100
committerGitHub <noreply@github.com>2022-11-11 17:08:21 +0100
commit10aa3827f7acee550259b41b37e6f043d0007950 (patch)
treec1ad817ebd96472707bb2467cf0d841e6fd3fafd /lib
parent1560c9384d4b061276af26901db134e051ef401d (diff)
parentbd7a1e4dcb592ac35bd6756d7d2568c3ebce2b5a (diff)
downloadnextcloud-server-10aa3827f7acee550259b41b37e6f043d0007950.tar.gz
nextcloud-server-10aa3827f7acee550259b41b37e6f043d0007950.zip
Merge pull request #35015 from natoponen/patch-1
Appropriate length check in Notification.php
Diffstat (limited to 'lib')
-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;