diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-12-15 16:25:39 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2021-12-17 10:04:25 +0300 |
commit | d4e83a798812c5ef891e10f1092be097a5f39d20 (patch) | |
tree | 15313f16929a95f784c4e630a8541fb0d1e8c5d8 /apps/files_sharing | |
parent | 1c296cbc86e6f5cd06dfe7168c983d0e6bb63aca (diff) |
Discard share notification for non-existing groups
Group shares might exist even after a group got deleted.
This fix catches the situation and discards the notification for the
obsolete group.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Co-authored-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/Notification/Notifier.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/Notification/Notifier.php b/apps/files_sharing/lib/Notification/Notifier.php index 7d79165dd26..d35e22c935d 100644 --- a/apps/files_sharing/lib/Notification/Notifier.php +++ b/apps/files_sharing/lib/Notification/Notifier.php @@ -192,7 +192,7 @@ class Notifier implements INotifier { } $group = $this->groupManager->get($share->getSharedWith()); - if (!$group->inGroup($user)) { + if ($group === null || !$group->inGroup($user)) { throw new AlreadyProcessedException(); } |