log trace to reported error

This commit is contained in:
2022-11-04 00:05:52 +01:00
parent 8237917a06
commit d41c3da290
5 changed files with 7 additions and 0 deletions

View File

@ -88,6 +88,7 @@ class d3webauthnadminlogin extends AdminController
Registry::getSession()->setVariable(WebauthnConf::GLOBAL_SWITCH, true);
Registry::getUtilsView()->addErrorToDisplay($e);
Registry::getLogger()->error('webauthn request options: '.$e->getDetailedErrorMessage(), ['UserId' => $userId]);
Registry::getLogger()->debug($e->getTraceAsString());
$this->getUtils()->redirect('index.php?cl=login');
}
}
@ -122,6 +123,7 @@ class d3webauthnadminlogin extends AdminController
} catch (WebauthnException $e) {
Registry::getUtilsView()->addErrorToDisplay($e);
Registry::getLogger()->error('Webauthn: '.$e->getDetailedErrorMessage(), ['UserId' => $userId]);
Registry::getLogger()->debug($e->getTraceAsString());
$user->logout();
$this->getUtils()->redirect('index.php?cl=login');
}