Skip to content

Commit b249683

Browse files
CarlSchwanbackportbot[bot]
authored andcommitted
fix: Ensure we don't get share by empty name
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 parent 4003136 commit b249683

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)