Skip to content

Commit 4c227c3

Browse files
luka-nextcloudbackportbot[bot]
authored andcommitted
fix(files_sharing): skip expiration notify for invalid share record
Signed-off-by: Luka Trovic <[email protected]> [skip ci]
1 parent 873ed75 commit 4c227c3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/files_sharing/lib/Command/ExiprationNotification.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99
namespace OCA\Files_Sharing\Command;
1010

11+
use OCA\Files_Sharing\OrphanHelper;
1112
use OCP\AppFramework\Utility\ITimeFactory;
1213
use OCP\IDBConnection;
1314
use OCP\Notification\IManager as NotificationManager;
@@ -62,7 +63,8 @@ public function execute(InputInterface $input, OutputInterface $output): int {
6263
foreach ($shares as $share) {
6364
if ($share->getExpirationDate() === null
6465
|| $share->getExpirationDate()->getTimestamp() < $minTime->getTimestamp()
65-
|| $share->getExpirationDate()->getTimestamp() > $maxTime->getTimestamp()) {
66+
|| $share->getExpirationDate()->getTimestamp() > $maxTime->getTimestamp()
67+
|| !$this->orphanHelper->isShareValid($share->getSharedBy(), $share->getNodeId())) {
6668
continue;
6769
}
6870

0 commit comments

Comments
 (0)