Closed
Description
Symfony version(s) affected
5.4+
Description
Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Credentials\\PasswordCredentials::__construct(): Argument #1 ($password) must be of type string, array given, called in /var/www/app/vendor/symfony/security-http/Authenticator/FormLoginAuthenticator.php on line 85
How to reproduce
Post array data for the password to a form login
curl -X POST --data '_username=foo&_password[]=bar' http://app.dev/login_check
Possible Solution
I saw that for the username there is a check in place:
Maybe we can do the same for the password? Happy to contribute this if it makes sense
Additional Context
Actually in dev mode there is another issue with the data collector:
TypeError:
rawurlencode(): Argument #1 ($string) must be of type string, array given
at /var/www/app/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php:127