From f71bfe554e57dccfdd30fd302b5fa299d0f3eb45 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 13 Apr 2026 08:50:31 +0200 Subject: [PATCH] fix(sharing): Don't give a reason when share from disabled user is no longer working Signed-off-by: Joas Schilling --- lib/private/Share20/Manager.php | 2 +- tests/lib/Share20/ManagerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 163526cdfbd1a..a043ee682194b 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1486,7 +1486,7 @@ private function checkShare(IShare $share, int &$added = 1): void { foreach ($uids as $uid) { $user = $this->userManager->get($uid); if ($user?->isEnabled() === false) { - throw new ShareNotFound($this->l->t('The requested share comes from a disabled user')); + throw new ShareNotFound($this->l->t('The requested share does not exist anymore')); } } } diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index aa87f71e0792b..cdbb36ac78d27 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -3304,7 +3304,7 @@ public function testGetShareByTokenWithException(): void { public function testGetShareByTokenHideDisabledUser(): void { $this->expectException(ShareNotFound::class); - $this->expectExceptionMessage('The requested share comes from a disabled user'); + $this->expectExceptionMessage('The requested share does not exist anymore'); $this->config ->expects($this->exactly(2))