Skip to content

Commit f721861

Browse files
Merge pull request #59612 from nextcloud/backport/59598/stable33
[stable33] fix(sharing): Don't give a reason when share from disabled user is no…
2 parents 281d95d + f71bfe5 commit f721861

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/private/Share20/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,7 @@ private function checkShare(IShare $share, int &$added = 1): void {
14861486
foreach ($uids as $uid) {
14871487
$user = $this->userManager->get($uid);
14881488
if ($user?->isEnabled() === false) {
1489-
throw new ShareNotFound($this->l->t('The requested share comes from a disabled user'));
1489+
throw new ShareNotFound($this->l->t('The requested share does not exist anymore'));
14901490
}
14911491
}
14921492
}

tests/lib/Share20/ManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3304,7 +3304,7 @@ public function testGetShareByTokenWithException(): void {
33043304

33053305
public function testGetShareByTokenHideDisabledUser(): void {
33063306
$this->expectException(ShareNotFound::class);
3307-
$this->expectExceptionMessage('The requested share comes from a disabled user');
3307+
$this->expectExceptionMessage('The requested share does not exist anymore');
33083308

33093309
$this->config
33103310
->expects($this->exactly(2))

0 commit comments

Comments
 (0)