-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
{HttpFoundation] [Session] fixed session compatibility with memcached/re... #8776
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
Conversation
} else { | ||
session_start(); | ||
if($this->getSaveHandler()->getSaveHandlerName() == 'files') | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curly bracket should be in the same line as the if statement. ===
should is preferred over ==
.
Could you add a test? It should fail before applying this fix. |
…/redis session storage Per https://bugs.php.net/bug.php?id=61470, and in fixing symfony#7380, the following error occurs when using a Memcache or Redis session store w/ Symfony security: "Authentication exception occurred; redirecting to authentication entry point (A Token was not found in the SecurityContext.)". This patch applies the first fix only if the session store is "files" {HttpFoundation] [Session] fixed session compatibility with memcached/redis session storage Per https://bugs.php.net/bug.php?id=61470, and in fixing symfony#7380, the following error occurs when using a Memcache or Redis session store w/ Symfony security: "Authentication exception occurred; redirecting to authentication entry point (A Token was not found in the SecurityContext.)". This patch applies the first fix only if the session store is "files"
Fixed and commits squashed. Do you have a suggestion how should I go about writing a test case for this? |
$_SESSION = $backup; | ||
} else { | ||
session_start(); | ||
if($this->getSaveHandler()->getSaveHandlerName() === 'files') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CS: if ('files' === $this->getSaveHandler()->getSaveHandlerName()) {
Not sure how this could be tested easily. |
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8776). Discussion ---------- {HttpFoundation] [Session] fixed session compatibility with memcached/re... ...dis session storage | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | no (no new failng/errors introduced) | Fixed tickets | 7380 | License | MIT Per https://bugs.php.net/bug.php?id=61470, and in fixing #7380, the following error occurs when using a Memcache or Redis session store w/ Symfony security: "Authentication exception occurred; redirecting to authentication entry point (A Token was not found in the SecurityContext.)". This patch applies the first fix only if the session store is "files" Commits ------- eb8d8eb {HttpFoundation] [Session] fixed session compatibility with memcached/redis session storage
...dis session storage
Per https://bugs.php.net/bug.php?id=61470, and in fixing #7380, the following error occurs when using a Memcache or Redis session store w/ Symfony security: "Authentication exception occurred; redirecting to authentication entry point (A Token was not found in the SecurityContext.)". This patch applies the first fix only if the session store is "files"