Loading dbee.info.yml +2 −3 Original line number Diff line number Diff line Loading @@ -3,9 +3,8 @@ type: module description: 'Encrypt user email addresses stored into the database for security reasons. This module doesn''t alter user experience' package: Security dependencies: - drupal:user (>=8.5.0) - drupal:user - encrypt:encrypt - real_aes:real_aes configure: entity.encryption_profile.collection core: '8.x' core_version_requirement: ^8 || ^9 core_version_requirement: ^8.7.7 || ^9 || ^10 dbee.users.inc +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ function dbee_update_crypt_all($action, $dbee_context = FALSE, $force_batch = FA ], ], 'finished' => 'dbee_update_crypt_users_all_batch_finished', 'file' => drupal_get_path('module', 'dbee') . '/dbee.users.inc', 'file' => \Drupal::service('extension.list.module')->getPath('dbee') . '/dbee.users.inc', ]; batch_set($batch); Loading tests/src/Functional/DbeeContactMailTest.php +3 −2 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ class DbeeContactMailTest extends DbeeWebTestBase { * * {@inheritdoc} */ public function setUp() { public function setUp(): void { // Enable any modules required for the test. parent::setUp(); $this->recipientUser = $this->drupalCreateUser(); Loading @@ -65,7 +65,8 @@ class DbeeContactMailTest extends DbeeWebTestBase { 'subject[0][value]' => $this->randomString(20), 'message[0][value]' => $this->randomString(128), ]; $this->drupalPostForm($contact_uri, $edit, 'Send message'); $this->drupalGet($contact_uri); $this->submitForm($edit, 'Send message'); $session->responseContains('Your message has been sent.'); $this->assertMail('to', $this->recipientUser->getEmail(), 'The recipient email address is valid'); $this->assertMail('reply-to', $this->senderUser->getEmail(), 'The sender email address is valid'); Loading tests/src/Functional/DbeeCoreFunctionsTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ class DbeeCoreFunctionsTest extends DbeeWebSwitchTestBase { * * {@inheritdoc} */ public function setUp() { public function setUp(): void { // Enable any modules required for the test. parent::setUp(); $this->userToLoad = $this->drupalCreateUser(); Loading tests/src/Functional/DbeeEditUserTest.php +9 −5 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ class DbeeEditUserTest extends DbeeWebTestBase { * * {@inheritdoc} */ public function setUp() { public function setUp(): void { parent::setUp(); // Create a basic user with mail = 'example@example.com'. This email will // be used to testing if the system prevent from creating a new user with Loading Loading @@ -79,7 +79,8 @@ class DbeeEditUserTest extends DbeeWebTestBase { 'mail' => mb_strtolower($data0[$uid]['mail']), 'current_pass' => $pass, ]; $this->drupalPostForm('user/' . $uid . '/edit', $edit1, 'Save'); $this->drupalGet('user/' . $uid . '/edit'); $this->submitForm($edit1, 'Save'); $data1 = $data0; $data1[$uid]['mail'] = $edit1['mail']; $this->assertTrue($this->dbeeAllUsersValid($data1), 'The user mail is correctly encrypted.'); Loading @@ -90,7 +91,8 @@ class DbeeEditUserTest extends DbeeWebTestBase { 'mail' => $this->randomMachineName() . '@EXAMple.com', 'current_pass' => $pass, ]; $this->drupalPostForm('user/' . $uid . '/edit', $edit3, 'Save'); $this->drupalGet('user/' . $uid . '/edit'); $this->submitForm($edit3, 'Save'); // Check user account on edition. // We successfully edit the user email address : // to a new case sensitive email address: Loading @@ -111,7 +113,8 @@ class DbeeEditUserTest extends DbeeWebTestBase { 'mail' => mb_strtolower($this->randomMachineName() . '@example.com'), 'current_pass' => $pass, ]; $this->drupalPostForm('user/' . $uid . '/edit', $edit4, 'Save'); $this->drupalGet('user/' . $uid . '/edit'); $this->submitForm($edit4, 'Save'); // Check user account on edition. // We successfully edit the user email address again: // back to a new lower case email address: Loading @@ -131,7 +134,8 @@ class DbeeEditUserTest extends DbeeWebTestBase { 'mail' => mb_strtoupper($this->existingUser->getEmail()), 'current_pass' => $pass, ]; $this->drupalPostForm('user/' . $uid . '/edit', $edit5, 'Save'); $this->drupalGet('user/' . $uid . '/edit'); $this->submitForm($edit5, 'Save'); // Check if new user account has not been created. // From the user_account_form_validate() function. // The system successfully detects when someone trying to save the same Loading Loading
dbee.info.yml +2 −3 Original line number Diff line number Diff line Loading @@ -3,9 +3,8 @@ type: module description: 'Encrypt user email addresses stored into the database for security reasons. This module doesn''t alter user experience' package: Security dependencies: - drupal:user (>=8.5.0) - drupal:user - encrypt:encrypt - real_aes:real_aes configure: entity.encryption_profile.collection core: '8.x' core_version_requirement: ^8 || ^9 core_version_requirement: ^8.7.7 || ^9 || ^10
dbee.users.inc +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ function dbee_update_crypt_all($action, $dbee_context = FALSE, $force_batch = FA ], ], 'finished' => 'dbee_update_crypt_users_all_batch_finished', 'file' => drupal_get_path('module', 'dbee') . '/dbee.users.inc', 'file' => \Drupal::service('extension.list.module')->getPath('dbee') . '/dbee.users.inc', ]; batch_set($batch); Loading
tests/src/Functional/DbeeContactMailTest.php +3 −2 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ class DbeeContactMailTest extends DbeeWebTestBase { * * {@inheritdoc} */ public function setUp() { public function setUp(): void { // Enable any modules required for the test. parent::setUp(); $this->recipientUser = $this->drupalCreateUser(); Loading @@ -65,7 +65,8 @@ class DbeeContactMailTest extends DbeeWebTestBase { 'subject[0][value]' => $this->randomString(20), 'message[0][value]' => $this->randomString(128), ]; $this->drupalPostForm($contact_uri, $edit, 'Send message'); $this->drupalGet($contact_uri); $this->submitForm($edit, 'Send message'); $session->responseContains('Your message has been sent.'); $this->assertMail('to', $this->recipientUser->getEmail(), 'The recipient email address is valid'); $this->assertMail('reply-to', $this->senderUser->getEmail(), 'The sender email address is valid'); Loading
tests/src/Functional/DbeeCoreFunctionsTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ class DbeeCoreFunctionsTest extends DbeeWebSwitchTestBase { * * {@inheritdoc} */ public function setUp() { public function setUp(): void { // Enable any modules required for the test. parent::setUp(); $this->userToLoad = $this->drupalCreateUser(); Loading
tests/src/Functional/DbeeEditUserTest.php +9 −5 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ class DbeeEditUserTest extends DbeeWebTestBase { * * {@inheritdoc} */ public function setUp() { public function setUp(): void { parent::setUp(); // Create a basic user with mail = 'example@example.com'. This email will // be used to testing if the system prevent from creating a new user with Loading Loading @@ -79,7 +79,8 @@ class DbeeEditUserTest extends DbeeWebTestBase { 'mail' => mb_strtolower($data0[$uid]['mail']), 'current_pass' => $pass, ]; $this->drupalPostForm('user/' . $uid . '/edit', $edit1, 'Save'); $this->drupalGet('user/' . $uid . '/edit'); $this->submitForm($edit1, 'Save'); $data1 = $data0; $data1[$uid]['mail'] = $edit1['mail']; $this->assertTrue($this->dbeeAllUsersValid($data1), 'The user mail is correctly encrypted.'); Loading @@ -90,7 +91,8 @@ class DbeeEditUserTest extends DbeeWebTestBase { 'mail' => $this->randomMachineName() . '@EXAMple.com', 'current_pass' => $pass, ]; $this->drupalPostForm('user/' . $uid . '/edit', $edit3, 'Save'); $this->drupalGet('user/' . $uid . '/edit'); $this->submitForm($edit3, 'Save'); // Check user account on edition. // We successfully edit the user email address : // to a new case sensitive email address: Loading @@ -111,7 +113,8 @@ class DbeeEditUserTest extends DbeeWebTestBase { 'mail' => mb_strtolower($this->randomMachineName() . '@example.com'), 'current_pass' => $pass, ]; $this->drupalPostForm('user/' . $uid . '/edit', $edit4, 'Save'); $this->drupalGet('user/' . $uid . '/edit'); $this->submitForm($edit4, 'Save'); // Check user account on edition. // We successfully edit the user email address again: // back to a new lower case email address: Loading @@ -131,7 +134,8 @@ class DbeeEditUserTest extends DbeeWebTestBase { 'mail' => mb_strtoupper($this->existingUser->getEmail()), 'current_pass' => $pass, ]; $this->drupalPostForm('user/' . $uid . '/edit', $edit5, 'Save'); $this->drupalGet('user/' . $uid . '/edit'); $this->submitForm($edit5, 'Save'); // Check if new user account has not been created. // From the user_account_form_validate() function. // The system successfully detects when someone trying to save the same Loading