Skip to content
Snippets Groups Projects
Commit 7e29102f authored by catch's avatar catch
Browse files

Issue #2462105 by jhedstrom, anmolgoyal74, nexusnovaz, borisson_, berdir,...

Issue #2462105 by jhedstrom, anmolgoyal74, nexusnovaz, borisson_, berdir, mkalkbrenner, fago: Improve failed password hashing exception message
parent 22ee9bdb
No related branches found
No related tags found
13 merge requests!11131[10.4.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks,!3878Removed unused condition head title for views,!3818Issue #2140179: $entity->original gets stale between updates,!3154Fixes #2987987 - CSRF token validation broken on routes with optional parameters.,!3133core/modules/system/css/components/hidden.module.css,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!2812Issue #3312049: [Followup] Fix Drupal.Commenting.FunctionComment.MissingReturnType returns for NULL,!2062Issue #3246454: Add weekly granularity to views date sort,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!617Issue #3043725: Provide a Entity Handler for user cancelation,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493
Pipeline #315903 passed with warnings
Pipeline: drupal

#315924

    Pipeline: drupal

    #315915

      Pipeline: drupal

      #315905

        ......@@ -56,7 +56,7 @@ public function preSave() {
        $this->value = \Drupal::service('password')->hash(trim($this->value));
        // Abort if the hashing failed and returned FALSE.
        if (!$this->value) {
        throw new EntityMalformedException('The entity does not have a password.');
        throw new EntityMalformedException(sprintf("Failed to hash the %s password.", $entity->getEntityType()->getLabel()));
        }
        }
        ......
        ......@@ -168,7 +168,7 @@ public function testPreSaveExceptionNew(): void {
        $entity = EntityTest::create();
        $entity->test_field = str_repeat('a', PasswordInterface::PASSWORD_MAX_LENGTH + 1);
        $this->expectException(EntityStorageException::class);
        $this->expectExceptionMessage('The entity does not have a password');
        $this->expectExceptionMessage('Failed to hash the Test entity password.');
        $entity->save();
        }
        ......@@ -183,7 +183,7 @@ public function testPreSaveExceptionExisting(): void {
        $this->assertNotEquals('will_be_hashed', $entity->test_field->value);
        $this->expectException(EntityStorageException::class);
        $this->expectExceptionMessage('The entity does not have a password');
        $this->expectExceptionMessage('Failed to hash the Test entity password.');
        $entity->test_field = str_repeat('a', PasswordInterface::PASSWORD_MAX_LENGTH + 1);
        $entity->save();
        }
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment