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

Default storage restored to $_SESSION #66

Merged
merged 1 commit into from
Dec 20, 2016

Conversation

Slamdunk
Copy link
Contributor

Hi, I'm using Guard not as a middleware but as a standalone component, so in my app I never call __invoke method.

The PR #55 introduced a BC break since after that I have to manually instantiate Guard with something like this:

$prefix = 'csrf';
if (! isset($_SESSION[$prefix])) {
    $_SESSION[$prefix] = array();
}
$csrf = new \Slim\Csrf\Guard($prefix, $_SESSION[$prefix]);

Setting the new method validateStorage to public let me call it manually and retain default behaviour.

akrabat added a commit to akrabat/Slim-Csrf that referenced this pull request Dec 20, 2016
@akrabat akrabat merged commit f43cb59 into slimphp:master Dec 20, 2016
@akrabat akrabat added this to the 0.8.1 milestone Dec 20, 2016
@akrabat
Copy link
Member

akrabat commented Dec 20, 2016

Thanks.

@akrabat
Copy link
Member

akrabat commented Dec 20, 2016

Version 0.8.1 released with this fix in it.

@Slamdunk Slamdunk deleted the hotfix/session-default branch December 20, 2016 20:52
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.

2 participants