Skip to content

Commit faf16fb

Browse files
Merge pull request #53677 from nextcloud/fix/noid/ignore-missing-owner
2 parents bed94cc + 58c089e commit faf16fb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

apps/dav/lib/Connector/Sabre/FilesPlugin.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use OC\AppFramework\Http\Request;
1111
use OC\FilesMetadata\Model\FilesMetadata;
12+
use OC\User\NoUserException;
1213
use OCA\DAV\Connector\Sabre\Exception\InvalidPath;
1314
use OCA\Files_Sharing\External\Mount as SharingExternalMount;
1415
use OCP\Accounts\IAccountManager;
@@ -374,7 +375,13 @@ public function handleGetProperties(PropFind $propFind, \Sabre\DAV\INode $node)
374375
}
375376

376377
// Check if the user published their display name
377-
$ownerAccount = $this->accountManager->getAccount($owner);
378+
try {
379+
$ownerAccount = $this->accountManager->getAccount($owner);
380+
} catch (NoUserException) {
381+
// do not lock process if owner is not local
382+
return null;
383+
}
384+
378385
$ownerNameProperty = $ownerAccount->getProperty(IAccountManager::PROPERTY_DISPLAYNAME);
379386

380387
// Since we are not logged in, we need to have at least the published scope

0 commit comments

Comments
 (0)