mirror of https://github.com/MISP/MISP
fix: [otp] pre-auth action list only expanded if otp is enabled
parent
6ec8391e46
commit
e9c00cb1b4
|
@ -363,7 +363,11 @@ class AppController extends Controller
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if ($this->params['controller'] !== 'users' || !in_array($this->params['action'], array('login', 'register', 'email_otp'))) {
|
||||
$pre_auth_actions = array('login', 'register');
|
||||
if (!empty(Configure::read('Security.email_otp_enabled'))) {
|
||||
$pre_auth_actions[] = 'email_otp';
|
||||
}
|
||||
if ($this->params['controller'] !== 'users' || !in_array($this->params['action'], $pre_auth_actions)) {
|
||||
if (!$this->request->is('ajax')) {
|
||||
$this->Session->write('pre_login_requested_url', $this->here);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue