From 80a3734171f4c019498117791c10c2816822a0cf Mon Sep 17 00:00:00 2001 From: juminet Date: Fri, 19 Sep 2025 07:03:51 +0000 Subject: [PATCH] #426 Increased the number of required characters when setting a new password in Chill --- .changes/unreleased/Fixed-20250918-114044.yaml | 6 ++++++ src/Bundle/ChillMainBundle/Form/UserPasswordType.php | 2 +- .../ChillMainBundle/Tests/Controller/UserControllerTest.php | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 .changes/unreleased/Fixed-20250918-114044.yaml diff --git a/.changes/unreleased/Fixed-20250918-114044.yaml b/.changes/unreleased/Fixed-20250918-114044.yaml new file mode 100644 index 000000000..fe50576fe --- /dev/null +++ b/.changes/unreleased/Fixed-20250918-114044.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: Increased the number of required characters when setting a new password in Chill from 9 to 14 - GDPR compliance +time: 2025-09-18T11:40:44.858533536+02:00 +custom: + Issue: "426" + SchemaChange: No schema change diff --git a/src/Bundle/ChillMainBundle/Form/UserPasswordType.php b/src/Bundle/ChillMainBundle/Form/UserPasswordType.php index 256e68731..d3afb9250 100644 --- a/src/Bundle/ChillMainBundle/Form/UserPasswordType.php +++ b/src/Bundle/ChillMainBundle/Form/UserPasswordType.php @@ -59,7 +59,7 @@ class UserPasswordType extends AbstractType 'invalid_message' => 'The password fields must match', 'constraints' => [ new Length([ - 'min' => 9, + 'min' => 14, 'minMessage' => 'The password must be greater than {{ limit }} characters', ]), new NotBlank(), diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php index ba76df8ca..e135d3447 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php @@ -45,7 +45,7 @@ final class UserControllerTest extends WebTestCase self::assertResponseIsSuccessful(); $username = 'Test_user'.uniqid(); - $password = 'Password1234!'; + $password = 'Password_1234!'; // Fill in the form and submit it @@ -99,7 +99,7 @@ final class UserControllerTest extends WebTestCase { $client = $this->getClientAuthenticatedAsAdmin(); $crawler = $client->request('GET', "/fr/admin/user/{$userId}/edit_password"); - $newPassword = '1234Password!'; + $newPassword = '1234_Password!'; $form = $crawler->selectButton('Changer le mot de passe')->form([ 'chill_mainbundle_user_password[new_password][first]' => $newPassword,