-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Consistent error handling in remember me services #23042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@lstrojny can you please rebase on branch 3.4? |
@nicolas-grekas done |
@@ -11,6 +11,7 @@ | |||
|
|||
namespace Symfony\Component\Security\Http\RememberMe; | |||
|
|||
use Exception; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't "use" root classes on the code base, so you should use \Exception
everywhere instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@nicolas-grekas done |
Thank you @lstrojny. |
…rojny) This PR was merged into the 3.4 branch. Discussion ---------- Consistent error handling in remember me services | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | yes | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT RememberMeServices lacked consistent error handling so far making it impossible for implementors to e.g. maintain sufficiently detailed audit logs for remember me errors. Since remember me is a very sensitive area in any application, detailed logging is crucial. The change proposed allows `loginFail` to optionally take the exception object as a second parameter and uses said exception consistently internally by calling `loginFail` instead of `cancelCookie`. Commits ------- eda1888 Consistent error handling in remember me services
RememberMeServices lacked consistent error handling so far making it impossible for implementors to e.g. maintain sufficiently detailed audit logs for remember me errors. Since remember me is a very sensitive area in any application, detailed logging is crucial.
The change proposed allows
loginFail
to optionally take the exception object as a second parameter and uses said exception consistently internally by callingloginFail
instead ofcancelCookie
.