diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-12-15 14:25:39 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2021-12-17 07:09:28 +0000 |
commit | 3b5dd77275edc06c504253a84b801a7c1c0e8076 (patch) | |
tree | 6ffc2db1b267ba7e3794603be654392d68dc9a10 | |
parent | d750eb1da818e11898f9de5262750f56bc5203d5 (diff) | |
download | nextcloud-server-3b5dd77275edc06c504253a84b801a7c1c0e8076.tar.gz nextcloud-server-3b5dd77275edc06c504253a84b801a7c1c0e8076.zip |
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>
-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 2499896653b..22cf83b5477 100644 --- a/apps/files_sharing/lib/Notification/Notifier.php +++ b/apps/files_sharing/lib/Notification/Notifier.php @@ -193,7 +193,7 @@ class Notifier implements INotifier { } $group = $this->groupManager->get($share->getSharedWith()); - if (!$group->inGroup($user)) { + if ($group === null || !$group->inGroup($user)) { throw new AlreadyProcessedException(); } |