Skip to content
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

Add Session based CSRF Protection #5201

Merged
merged 5 commits into from
Oct 23, 2021
Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Oct 13, 2021

Description

Cross-Site Request Forgery Prevention Cheat Sheet says,

In short, the following principles should be followed to defend against CSRF:
...
For stateful software use the synchronizer token pattern
For stateless software use double submit cookies

Now CI4 has only "double submit cookies".
This PR adds "synchronizer token pattern".

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis marked this pull request as draft October 13, 2021 00:31
@kenjis kenjis force-pushed the add-csrf-session branch 2 times, most recently from b2d44fb to 7d93687 Compare October 17, 2021 00:50
@kenjis kenjis marked this pull request as ready for review October 17, 2021 01:13
@kenjis kenjis merged commit a087518 into codeigniter4:develop Oct 23, 2021
@kenjis kenjis deleted the add-csrf-session branch October 23, 2021 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants