Skip to content

Commit 8752268

Browse files
authored
Merge pull request #63827 from nextcloud/carl/fix-validation
fix: Ensure we don't get share by empty name
2 parents 3e15f01 + 3454865 commit 8752268

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)