Merge pull request #15700 from nextcloud/fix/open_multiple_link_shares

Redirect to the right token on public shares
This commit is contained in:
Morris Jobke 2019-05-24 16:09:01 +02:00 committed by GitHub
commit 67432a2141
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -185,6 +185,20 @@ abstract class AuthPublicShareController extends PublicShareController {
$route = $params['_route'];
unset($params['_route']);
}
// If the token doesn't match the rest of the arguments can't be trusted either
if (isset($params['token']) && $params['token'] !== $this->getToken()) {
$params = [
'token' => $this->getToken(),
];
}
// We need a token
if (!isset($params['token'])) {
$params = [
'token' => $this->getToken(),
];
}
}
return new RedirectResponse($this->urlGenerator->linkToRoute($route, $params));