mirror of
https://github.com/Icinga/icingaweb2.git
synced 2026-06-13 18:40:34 -04:00
The `TwoFactor` interface methods that contain logic are implemented by module developers and may contain arbitrary third-party code. Without guards at the call sites, an uncaught exception from a faulty implementation could crash the whole application. Each guard logs the exception with a confidential trace. `isEnrolled()` in `loadEnrolled()` rethrows so the caller aborts rather than silently continuing. `verify()` and `assembleEnrollmentFormElements()` show a user-facing message and call `onError()` to keep the user on the form. The existing `enroll()` and `unenroll()` catches are also updated: two separate `Logger::error()` calls become one, and the user-visible messages gain translation context. |
||
|---|---|---|
| .. | ||
| ChangePasswordForm.php | ||
| TwoFactorEnrollmentForm.php | ||