Skip to content

Commit 2b76471

Browse files
Merge pull request #59598 from nextcloud/bugfix/noid/dont-expose-the-real-reason
fix(sharing): Don't give a reason when share from disabled user is no…
2 parents 002d9b2 + 0b2ad9a commit 2b76471

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/private/Share20/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ private function checkShare(IShare $share, int &$added = 1): void {
14951495
foreach ($uids as $uid) {
14961496
$user = $this->userManager->get($uid);
14971497
if ($user?->isEnabled() === false) {
1498-
throw new ShareNotFound($this->l->t('The requested share comes from a disabled user'));
1498+
throw new ShareNotFound($this->l->t('The requested share does not exist anymore'));
14991499
}
15001500
}
15011501
}

tests/lib/Share20/ManagerTest.php

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

33193319
public function testGetShareByTokenHideDisabledUser(): void {
33203320
$this->expectException(ShareNotFound::class);
3321-
$this->expectExceptionMessage('The requested share comes from a disabled user');
3321+
$this->expectExceptionMessage('The requested share does not exist anymore');
33223322

33233323
$this->config
33243324
->expects($this->exactly(2))

0 commit comments

Comments
 (0)