mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-01-16 14:26:43 +00:00
do not require second factor for authentication when accessing webdav server
This commit is contained in:
parent
fc90b00a43
commit
2339e539be
|
|
@ -1,6 +1,7 @@
|
|||
--------------------------------------------------------------------------------
|
||||
Changes in version 6.0.37
|
||||
--------------------------------------------------------------------------------
|
||||
- do not require second factor for authentication when accessing webdav server
|
||||
- merge changes up to 5.1.44
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -64,12 +64,14 @@ class SeedDMS_Controller_Login extends SeedDMS_Controller_Common {
|
|||
return false;
|
||||
}
|
||||
|
||||
if($settings->_enable2FactorAuthentication) {
|
||||
if($user->getSecret()) {
|
||||
$tfa = new \RobThree\Auth\TwoFactorAuth(new \RobThree\Auth\Providers\Qr\BaconQrCodeProvider());
|
||||
if($tfa->verifyCode($user->getSecret(), $_POST['twofactauth']) !== true) {
|
||||
$this->setErrorMsg("login_error_text");
|
||||
return false;
|
||||
if($source == 'web') {
|
||||
if($settings->_enable2FactorAuthentication) {
|
||||
if($user->getSecret()) {
|
||||
$tfa = new \RobThree\Auth\TwoFactorAuth(new \RobThree\Auth\Providers\Qr\BaconQrCodeProvider());
|
||||
if($tfa->verifyCode($user->getSecret(), $_POST['twofactauth']) !== true) {
|
||||
$this->setErrorMsg("login_error_text");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user