Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Security] fixed a leak in the ContextListener #8946

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

Merged
merged 2 commits into from
Sep 6, 2013

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Sep 6, 2013

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

Trying to fix leaks when using the same Kernel to handle several requests in a row without resetting the Container or shutting down the Kernel.

@@ -65,8 +67,9 @@ public function __construct(SecurityContextInterface $context, array $userProvid
*/
public function handle(GetResponseEvent $event)
{
if (null !== $this->dispatcher && HttpKernelInterface::MASTER_REQUEST === $event->getRequestType()) {
if (false === $this->registered && null !== $this->dispatcher && HttpKernelInterface::MASTER_REQUEST === $event->getRequestType()) {
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this be !$this->registered ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't really care. Either looks fine to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

Doing your way, we could remove the initialization in the constructor.

fabpot added a commit that referenced this pull request Sep 6, 2013
This PR was merged into the 2.2 branch.

Discussion
----------

[Security] fixed a leak in the ContextListener

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Trying to fix leaks when using the same Kernel to handle several requests in a row without resetting the Container or shutting down the Kernel.

Commits
-------

899f176 [Security] fixed a leak in ExceptionListener
2fd8a7a [Security] fixed a leak in the ContextListener
@fabpot fabpot merged commit 899f176 into symfony:2.2 Sep 6, 2013
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