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

Bug: The lifetime of the CSRF check cookie cannot be set to 0 (Session). #3655

Closed
lf-uraku-yuki opened this issue Sep 18, 2020 · 0 comments · Fixed by #3656
Closed

Bug: The lifetime of the CSRF check cookie cannot be set to 0 (Session). #3655

lf-uraku-yuki opened this issue Sep 18, 2020 · 0 comments · Fixed by #3656
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@lf-uraku-yuki
Copy link
Contributor

Describe the bug
The lifetime of the CSRF check cookie cannot be set to 0 (Session).
Probably because the current time and the set value are added.

\Config\App.php

public $CSRFExpire = 0;
public $CSRFRegenerate = false;

CodeIgniter 4 version
4.0.4

Affected module(s)
CodeIgniter\Security\Security::CSRFSetCookie

Expected behavior, and steps to reproduce if appropriate
If 0 is specified, it will not be added to time () .

Context

  • OS: Windows 10Pro 2004 64bit
  • Web server: php spark serve
  • PHP version: 7.4.10 Thread Safe 64bit
@lf-uraku-yuki lf-uraku-yuki added the bug Verified issues on the current code behavior or pull requests that will fix them label Sep 18, 2020
lf-uraku-yuki added a commit to lf-uraku-yuki/CodeIgniter4 that referenced this issue Sep 18, 2020
If CSRFExpire specifies 0, set 0 as it is.

fix: codeigniter4#3655
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant