Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Security] Avoid failing when PersistentRememberMeHandler handles a malformed cookie#60379
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
Can we cover this case with a test? |
Added a test yes. I think looking a bit more at what happens the flow is like this:
|
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.
Just one minor CS fix, thanks for the patch and the explanation.
$rememberMeDetails = RememberMeDetails::fromRawCookie($cookie); | ||
try { | ||
$rememberMeDetails = RememberMeDetails::fromRawCookie($cookie); | ||
} catch (AuthenticationException $e) { |
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.
}catch (AuthenticationException$e) { | |
}catch (AuthenticationException) { |
Thank you@Seldaek. |
ec1e4a2
intosymfony:6.4Uh oh!
There was an error while loading.Please reload this page.
If the remember me cookie is malformed like
"foo"
then the page crashes due tohttps://github.com/symfony/symfony/blob/7.3/src/Symfony/Component/Security/Http/RememberMe/RememberMeDetails.php#L39Not a huge deal but not very elegant