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:07:01 +0300 |
commit | c7e3ee9e0e218f2d6f3b7d8cb6d53d9ab93871d7 (patch) | |
tree | dc4e0907ba22dffe7e191a737661bf2fbdb5f96d /apps | |
parent | 8ba1a2f7ff7b900c84ddcc3fb9bd0699fad87bd2 (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')
-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(); } |