diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Base.php b/apps/dav/lib/CalDAV/Activity/Provider/Base.php index 99ad903f2479d..ee9c671613061 100644 --- a/apps/dav/lib/CalDAV/Activity/Provider/Base.php +++ b/apps/dav/lib/CalDAV/Activity/Provider/Base.php @@ -160,7 +160,7 @@ protected function generateGroupParameter($gid) { } return [ - 'type' => 'group', + 'type' => 'user-group', 'id' => $gid, 'name' => $this->groupDisplayNames[$gid], ]; diff --git a/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php b/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php index 37a56f88042da..9c4f5eeb47c44 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php @@ -182,7 +182,7 @@ public function dataGenerateGroupParameter() { */ public function testGenerateGroupParameter($gid) { $this->assertEquals([ - 'type' => 'group', + 'type' => 'user-group', 'id' => $gid, 'name' => $gid, ], $this->invokePrivate($this->provider, 'generateGroupParameter', [$gid])); diff --git a/apps/files_sharing/lib/Activity/Providers/Groups.php b/apps/files_sharing/lib/Activity/Providers/Groups.php index 9a8f7164c55d7..10f52882aeb89 100644 --- a/apps/files_sharing/lib/Activity/Providers/Groups.php +++ b/apps/files_sharing/lib/Activity/Providers/Groups.php @@ -150,7 +150,7 @@ protected function generateGroupParameter($gid) { } return [ - 'type' => 'group', + 'type' => 'user-group', 'id' => $gid, 'name' => $this->groupDisplayNames[$gid], ]; diff --git a/lib/private/RichObjectStrings/Validator.php b/lib/private/RichObjectStrings/Validator.php index 55a50fc2a48c1..29980885cf8d7 100644 --- a/lib/private/RichObjectStrings/Validator.php +++ b/lib/private/RichObjectStrings/Validator.php @@ -71,11 +71,17 @@ public function validate($subject, array $parameters) { foreach ($matches[1] as $parameter) { if (!isset($parameters[$parameter])) { throw new InvalidObjectExeption('Parameter is undefined'); - } else { - $this->validateParameter($parameters[$parameter]); } } } + + foreach ($parameters as $parameter) { + if (!\is_array($parameter)) { + throw new InvalidObjectExeption('Parameter is malformed'); + } + + $this->validateParameter($parameter); + } } /**