mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-11 16:35:38 +00:00
do not set user for controller, because it is not set at that time
This commit is contained in:
parent
aa416f90ec
commit
ab3475f512
|
@ -39,7 +39,7 @@ function _printMessage($heading, $message) { /* {{{ */
|
|||
} /* }}} */
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$controller = Controller::factory($tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
$controller = Controller::factory($tmp[1], array('dms'=>$dms));
|
||||
|
||||
if (isset($_REQUEST["sesstheme"]) && strlen($_REQUEST["sesstheme"])>0 && is_numeric(array_search($_REQUEST["sesstheme"],UI::getStyles())) ) {
|
||||
$theme = $_REQUEST["sesstheme"];
|
||||
|
@ -131,10 +131,10 @@ if ($user->isAdmin() && ($_SERVER['REMOTE_ADDR'] != $settings->_adminIP ) && ( $
|
|||
}
|
||||
|
||||
if($settings->_enable2FactorAuthentication) {
|
||||
if($secret = $user->getSecret()) {
|
||||
if($user->getSecret()) {
|
||||
require "vendor/autoload.php";
|
||||
$tfa = new \RobThree\Auth\TwoFactorAuth('SeedDMS');
|
||||
if($tfa->verifyCode($secret, $_POST['twofactauth']) !== true) {
|
||||
if($tfa->verifyCode($user->getSecret(), $_POST['twofactauth']) !== true) {
|
||||
_printMessage(getMLText("login_error_title"), getMLText("login_error_text"));
|
||||
exit;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user