fix: [authentication] prepend the baseurl to the login/logout redirects - fixes #3871

pull/5084/head
iglocska 2019-08-30 15:23:51 +02:00
parent bbb1a1c9e5
commit 2053d7e74f
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 2 additions and 2 deletions

View File

@ -76,8 +76,6 @@ class AppController extends Controller
'Session',
'Auth' => array(
'authError' => 'Unauthorised access.',
'loginRedirect' => array('controller' => 'users', 'action' => 'routeafterlogin'),
'logoutRedirect' => array('controller' => 'users', 'action' => 'login', 'admin' => false),
'authenticate' => array(
'Form' => array(
'passwordHasher' => 'Blowfish',
@ -105,6 +103,8 @@ class AppController extends Controller
public function beforeFilter()
{
$this->Auth->loginRedirect = Configure::read('MISP.baseurl') . '/users/routeafterlogin';
$this->Auth->logoutRedirect = Configure::read('MISP.baseurl') . '/users/login';
$this->__sessionMassage();
if (Configure::read('Security.allow_cors')) {
// Add CORS headers