Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[PasswordHasher] Custom encoders broken after upgrade #41020

Closed
@derrabus

Description

@derrabus

Symfony version(s) affected: 5.3.0-BETA2

Description
I have an application that uses a custom implementation of PasswordEncoderInterface. After upgrading that application to Symfony 5.3, I cannot log in anymore. Instead, I get the following exception:

Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactory::createHasher(): Argument #1 ($config) must be of type array, App\Security\MyEncoder given, called in /path/to/encoder-reproducer/vendor/symfony/password-hasher/Hasher/PasswordHasherFactory.php on line 60

How to reproduce
See https://github.com/derrabus/encoder-reproducer for a reproducer. You should encounter the error when trying to log in. Revert the last commit ("Upgrade to Symfony 5.3") and the app works as expected.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions