Fix direct access to authen page

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-06-19 21:40:45 +02:00
parent 6de656e435
commit 5455045a9b
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with 5 additions and 1 deletions

View File

@ -176,7 +176,9 @@ abstract class AuthPublicShareController extends PublicShareController {
$route = $this->getRoute('showShare');
if ($params === null) {
$params = [];
$params = [
'token' => $this->getToken(),
];
} else {
$params = json_decode($params, true);
if (isset($params['_route'])) {

View File

@ -83,6 +83,8 @@ class AuthPublicShareControllerTest extends \Test\TestCase {
$this->controller->method('isAuthenticated')
->willReturn(true);
$this->controller->setToken('myToken');
$this->session->method('get')
->willReturnMap(['public_link_authenticate_redirect', ['foo' => 'bar']]);