ソースを参照

Don't try to format deleted shares

Fixes #15455

The issue is that we have a fallback for shares to use the target. So
when the target exists again we happily format it (not that the shares
are still invalid).

This just tries to get the node. If we can't then boom.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tags/v19.0.0beta1
Roeland Jago Douma 4年前
コミット
7613681627
コミッターのメールアドレスに関連付けられたアカウントが存在しません
1個のファイルの変更10行の追加0行の削除
  1. 10
    0
      apps/files_sharing/lib/Controller/ShareAPIController.php

+ 10
- 0
apps/files_sharing/lib/Controller/ShareAPIController.php ファイルの表示

@@ -768,6 +768,16 @@ class ShareAPIController extends OCSController {
$known = $formatted = $miniFormatted = [];
$resharingRight = false;
foreach ($shares as $share) {
try {
$share->getNode();
} catch (NotFoundException $e) {
/*
* Ignore shares where we can't get the node
* For example delted shares
*/
continue;
}

if (in_array($share->getId(), $known) || $share->getSharedWith() === $this->currentUser) {
continue;
}

読み込み中…
キャンセル
保存