Skip to content
Snippets Groups Projects
Commit 92e2c14c authored by Si Hobbs's avatar Si Hobbs Committed by Joao Ventura
Browse files

Issue #3125484 by jibran, sime, jcnventura: Do not allow invalid plugin ID on...

Issue #3125484 by jibran, sime, jcnventura: Do not allow invalid plugin ID on tfa.validation.setup form
parent 7f5e3c57
No related branches found
No related tags found
No related merge requests found
......@@ -168,6 +168,9 @@ class BasicSetup extends FormBase {
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state, User $user = NULL, $method = 'tfa_totp', $reset = 0) {
if (!$this->tfaSetup->hasDefinition($method . '_setup')) {
throw new NotFoundHttpException($this->t('Plugin @plugin not found.', ['@plugin' => $method]));
}
/** @var \Drupal\user\Entity\User $account */
$account = $this->userStorage->load($this->currentUser()->id());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment