Skip to content

Commit 46478be

Browse files
Merge pull request #63853 from nextcloud/backport/63827/stable35
[stable35] fix: Ensure we don't get share by empty name
2 parents d82a5d5 + b249683 commit 46478be

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/private/Share20/Manager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,8 +1327,8 @@ public function getShareById($id, $recipient = null, bool $onlyValid = true): IS
13271327

13281328
#[Override]
13291329
public function getShareByToken(string $token): IShare {
1330-
// tokens cannot be valid local usernames
1331-
if ($this->userManager->userExists($token)) {
1330+
// tokens cannot be valid local usernames or empty
1331+
if ($token === '' || $this->userManager->userExists($token)) {
13321332
throw new ShareNotFound();
13331333
}
13341334
$share = null;

0 commit comments

Comments
 (0)