Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 6 additions & 18 deletions lib/ShareByCircleProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -569,30 +569,18 @@ function (ShareWrapper $wrapper) {
}

/**
* Team shares are reached through the membership-based mount, never via the
* public /s/<token> route. Refusing to resolve the token here keeps the
* share out of the public share controller even though a token is still
* stored on the share row (it is reused as a mount-row key elsewhere).
*
* @param string $token
*
* @return IShare
* @throws IllegalIDChangeException
* @throws RequestBuilderException
* @throws ShareNotFound
*/
public function getShareByToken($token): IShare {
if (is_null($token)) {
throw new ShareNotFound();
}

try {
$wrappedShare = $this->shareWrapperService->getShareByToken($token);
} catch (ShareWrapperNotFoundException $e) {
throw new ShareNotFound();
}

$share = $wrappedShare->getShare($this->rootFolder, $this->userManager, $this->urlGenerator);
if ($share->getPassword() !== '') {
$this->logger->notice('share is protected by a password, hash: ' . $share->getPassword());
}

return $share;
throw new ShareNotFound();
}


Expand Down
Loading