icingaweb2/application/forms/Account
Johannes Rauh 5cd6a2b90d Guard hook method call sites against implementation exceptions
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.
2026-05-27 10:47:21 +02:00
..
ChangePasswordForm.php License source files as GPL-3.0-or-later 2026-03-26 17:49:26 +01:00
TwoFactorEnrollmentForm.php Guard hook method call sites against implementation exceptions 2026-05-27 10:47:21 +02:00