From 5381fba8f5127551813c6eb30da0ab72509786f7 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Thu, 25 May 2023 16:47:18 +0200 Subject: [PATCH] Add autocompte="off" to secret input fields This was done for the safe-store recovery token authentication form and the verify sms challenge forms. See: https://www.pivotaltracker.com/story/show/185006156 --- .../Form/Type/AuthenticateSafeStoreType.php | 5 ++++- .../SelfServiceBundle/Form/Type/VerifySmsChallengeType.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Form/Type/AuthenticateSafeStoreType.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Form/Type/AuthenticateSafeStoreType.php index aea122c8e..9dd0ede00 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Form/Type/AuthenticateSafeStoreType.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Form/Type/AuthenticateSafeStoreType.php @@ -32,7 +32,10 @@ public function buildForm(FormBuilderInterface $builder, array $options) $builder->add('secret', PasswordType::class, [ 'label' => 'ss.form.ss_authenticate_safe_store_type.text.secret', 'required' => true, - 'attr' => ['autofocus' => true], + 'attr' => [ + 'autofocus' => true, + 'autocomplete' => 'off' + ], ]); $builder->add('verifySecret', SubmitType::class, [ 'label' => 'ss.form.ss_authenticate_safe_store_type.button.continue', diff --git a/src/Surfnet/StepupSelfService/SelfServiceBundle/Form/Type/VerifySmsChallengeType.php b/src/Surfnet/StepupSelfService/SelfServiceBundle/Form/Type/VerifySmsChallengeType.php index add4c97b4..3dcf35bbb 100644 --- a/src/Surfnet/StepupSelfService/SelfServiceBundle/Form/Type/VerifySmsChallengeType.php +++ b/src/Surfnet/StepupSelfService/SelfServiceBundle/Form/Type/VerifySmsChallengeType.php @@ -33,7 +33,10 @@ public function buildForm(FormBuilderInterface $builder, array $options) $builder->add('challenge', TextType::class, [ 'label' => 'ss.form.ss_verify_sms_challenge.text.challenge', 'required' => true, - 'attr' => ['autofocus' => true], + 'attr' => [ + 'autofocus' => true, + 'autocomplete' => 'off', + ], 'label_attr' => ['class' => 'pull-right'], ]); $builder->add('resendChallenge', AnchorType::class, [