-
-
Notifications
You must be signed in to change notification settings - Fork 963
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
fix: regenerate csrf if flow has expired #2455
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2455 +/- ##
==========================================
+ Coverage 75.89% 76.57% +0.67%
==========================================
Files 311 317 +6
Lines 19185 17636 -1549
==========================================
- Hits 14560 13504 -1056
+ Misses 3486 3193 -293
+ Partials 1139 939 -200
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
While the PR is being worked on I will mark it as a draft. That declutters our review backlog :) Once you're done with your changes and would like someone to review them, mark the PR as ready and request a review from one of the maintainers. Thank you! |
b25b152
to
ed5be99
Compare
ed5be99
to
82de086
Compare
@jonas-jonas do we need to do this in the code strategy too? |
@splaunov sorry for the late review, I am just catching ip on PRs! If the merge conflicts are addressed I will merge this immediately! |
Yes, recovery should need that too: https://github.com/ory/kratos/blob/master/selfservice/flow/recovery/error.go#L82 I can take a look, or if you want to do it, you can do that in here. @splaunov :) |
82de086
to
3aae25a
Compare
The fix has been merged form some other branch. |
When user clicks the verification link sent over email and the link has expired, then Kratos creates new verification flow and browser is redirected to verification ui with the new flow id set as a URL parameter.
The problem is that the verification UI cannot fetch the new flow as it has no csrf token set. So, browser gets 403 "Forbidden" error.
This PR eliminates csrf checking if verification flow has no csrf token.
Related issue(s)
Checklist
introduces a new feature.
contributing code guidelines.
vulnerability. If this pull request addresses a security. vulnerability, I
confirm that I got green light (please contact
[email protected]) from the maintainers to push
the changes.
works.
Further Comments