Skip to content

Commit 2597805

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 b995793 commit 2597805

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
@@ -1411,8 +1411,8 @@ public function getShareById($id, $recipient = null, bool $onlyValid = true): IS
14111411

14121412
#[Override]
14131413
public function getShareByToken(string $token): IShare {
1414-
// tokens cannot be valid local usernames
1415-
if ($this->userManager->userExists($token)) {
1414+
// tokens cannot be valid local usernames or empty
1415+
if ($token === '' || $this->userManager->userExists($token)) {
14161416
throw new ShareNotFound();
14171417
}
14181418
$share = null;

0 commit comments

Comments
 (0)