-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Description
Symfony version(s) affected
7.3.1
Description
With #46118 passing an empty username/password to the JSON login was deprecated and #50866 turned this deprecation into an exception.
However, the currently thrown BadRequestHttpException is too generic. Passing an empty username/password is not a bad HTTP request, the request payload is well-formed. That an empty username/password is rejected is a requirement of the security domain. Thus an exception more specific to the security domain should be thrown instead.
How to reproduce
Try to pass an empty username or password to the JSON login.
Possible Solution
When taking #58007 into account, the JSON login could throw the BadCredentialsException instead. Or switch back to not throwing an exception at all on empty username/password since the UserBadge will throw a BadCredentialsException anyways with Symfony 8.
Additional Context
No response