diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2025-06-25 14:35:02 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2025-06-25 13:36:11 +0000 |
commit | 20640232efc3881fc3300f14d65d9235619cfa74 (patch) | |
tree | 7da02f805d3d4d849aae1bb278b4a13fcc6ec4a1 | |
parent | f0352e39fd8de9f66502190bc07d07a0f0cd72c7 (diff) | |
download | nextcloud-server-backport/53677/stable30.tar.gz nextcloud-server-backport/53677/stable30.zip |
fix(dav): catch exception on non local accountbackport/53677/stable30
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r-- | apps/dav/lib/Connector/Sabre/FilesPlugin.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 2739da47284..19894fa807f 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -9,6 +9,7 @@ namespace OCA\DAV\Connector\Sabre; use OC\AppFramework\Http\Request; use OC\FilesMetadata\Model\FilesMetadata; +use OC\User\NoUserException; use OCA\DAV\Connector\Sabre\Exception\InvalidPath; use OCP\Accounts\IAccountManager; use OCP\Constants; @@ -370,7 +371,13 @@ class FilesPlugin extends ServerPlugin { } // Check if the user published their display name - $ownerAccount = $this->accountManager->getAccount($owner); + try { + $ownerAccount = $this->accountManager->getAccount($owner); + } catch (NoUserException) { + // do not lock process if owner is not local + return null; + } + $ownerNameProperty = $ownerAccount->getProperty(IAccountManager::PROPERTY_DISPLAYNAME); // Since we are not logged in, we need to have at least the published scope |