Fix direct access to authen page
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
6de656e435
commit
5455045a9b
|
@ -176,7 +176,9 @@ abstract class AuthPublicShareController extends PublicShareController {
|
||||||
$route = $this->getRoute('showShare');
|
$route = $this->getRoute('showShare');
|
||||||
|
|
||||||
if ($params === null) {
|
if ($params === null) {
|
||||||
$params = [];
|
$params = [
|
||||||
|
'token' => $this->getToken(),
|
||||||
|
];
|
||||||
} else {
|
} else {
|
||||||
$params = json_decode($params, true);
|
$params = json_decode($params, true);
|
||||||
if (isset($params['_route'])) {
|
if (isset($params['_route'])) {
|
||||||
|
|
|
@ -83,6 +83,8 @@ class AuthPublicShareControllerTest extends \Test\TestCase {
|
||||||
$this->controller->method('isAuthenticated')
|
$this->controller->method('isAuthenticated')
|
||||||
->willReturn(true);
|
->willReturn(true);
|
||||||
|
|
||||||
|
$this->controller->setToken('myToken');
|
||||||
|
|
||||||
$this->session->method('get')
|
$this->session->method('get')
|
||||||
->willReturnMap(['public_link_authenticate_redirect', ['foo' => 'bar']]);
|
->willReturnMap(['public_link_authenticate_redirect', ['foo' => 'bar']]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue