Skip to content

Commit 1bacb2a

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 12a45b3 commit 1bacb2a

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

13401340
#[Override]
13411341
public function getShareByToken(string $token): IShare {
1342-
// tokens cannot be valid local usernames
1343-
if ($this->userManager->userExists($token)) {
1342+
// tokens cannot be valid local usernames or empty
1343+
if ($token === '' || $this->userManager->userExists($token)) {
13441344
throw new ShareNotFound();
13451345
}
13461346
$share = null;

0 commit comments

Comments
 (0)