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

feat: add CSRF token randomization #5283

Merged
merged 7 commits into from
Nov 14, 2021

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Nov 4, 2021

Description

  • To avoid BREACH attacks
  • add Config\Security::$tokenRandomize (default is false)
  • if Config\Security::$tokenRandomize is true
    • randomize CSRF token with random key and XOR

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

Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not great with cryptography. This looks good to me but I would like it if someone else reviewed as well.

@kenjis kenjis added the enhancement PRs that improve existing functionalities label Nov 9, 2021
@kenjis kenjis requested a review from paulbalandan November 14, 2021 02:06
@kenjis
Copy link
Member Author

kenjis commented Nov 14, 2021

I added User Guide.

@kenjis kenjis merged commit c8f126d into codeigniter4:develop Nov 14, 2021
@kenjis kenjis deleted the feat-csrf-token-randomization branch November 14, 2021 23:53
@kenjis
Copy link
Member Author

kenjis commented Nov 14, 2021

Thanks, guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement PRs that improve existing functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants