do not require second factor for authentication when accessing webdav server

This commit is contained in:
Uwe Steinmann 2025-12-16 11:51:47 +01:00
parent fc90b00a43
commit 2339e539be
2 changed files with 9 additions and 6 deletions

View File

@ -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
--------------------------------------------------------------------------------

View File

@ -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;
}
}
}
}