Fix direct access to authen page

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/9518/head
Roeland Jago Douma 8 years ago
parent 6de656e435
commit 5455045a9b
No known key found for this signature in database
GPG Key ID: F941078878347C0C
  1. 4
      lib/public/AppFramework/AuthPublicShareController.php
  2. 2
      tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php

@ -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'])) {

@ -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']]);

Loading…
Cancel
Save