8
0
Fork 0

log trace to reported error

Dieser Commit ist enthalten in:
Daniel Seifert 2022-11-04 00:05:52 +01:00
Ursprung 8237917a06
Commit d41c3da290
Signiert von: DanielS
GPG-Schlüssel-ID: 6A513E13AEE66170
5 geänderte Dateien mit 7 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -73,6 +73,7 @@ class d3user_webauthn extends AdminDetailsController
} catch (Exception|ContainerExceptionInterface|NotFoundExceptionInterface|DoctrineDriverException $e) {
Registry::getUtilsView()->addErrorToDisplay($e);
Registry::getLogger()->error('webauthn creation request: '.$e->getMessage(), ['UserId' => $this->getEditObjectId()]);
Registry::getLogger()->debug($e->getTraceAsString());
Registry::getUtils()->redirect('index.php?cl=d3user_webauthn');
}
}
@ -93,6 +94,7 @@ class d3user_webauthn extends AdminDetailsController
}
} catch (WebauthnException|Exception|NotFoundExceptionInterface|ContainerExceptionInterface|DoctrineDriverException $e) {
Registry::getLogger()->error($e->getDetailedErrorMessage(), ['UserId' => $this->getEditObjectId()]);
Registry::getLogger()->debug($e->getTraceAsString());
Registry::getUtilsView()->addErrorToDisplay($e);
}
}

Datei anzeigen

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

Datei anzeigen

@ -79,6 +79,7 @@ class d3_account_webauthn extends AccountController
$this->setPageType('requestnew');
} catch (WebauthnException $e) {
Registry::getLogger()->error('webauthn register: '.$e->getDetailedErrorMessage(), ['UserId: ' => $this->getUser()->getId()]);
Registry::getLogger()->debug($e->getTraceAsString());
Registry::getUtilsView()->addErrorToDisplay($e);
}
}

Datei anzeigen

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

Datei anzeigen

@ -202,6 +202,7 @@ class d3_webauthn_UserComponent extends d3_webauthn_UserComponent_parent
'Webauthn: '.$e->getDetailedErrorMessage(),
['UserId' => Registry::getSession()->getVariable(WebauthnConf::WEBAUTHN_SESSION_CURRENTUSER)]
);
Registry::getLogger()->debug($e->getTraceAsString());
$user->logout();
}
}