This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Nicolas Grekas 848a83078c bug #30327 [HttpKernel] Fix possible infinite loop of exceptions (enumag)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix possible infinite loop of exceptions

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

I ran into an [issue](https://github.com/php-enqueue/enqueue-dev/issues/774) in the enqueue library which copied this part of code from Symfony. I'm now starting to understand what the problem is and it should most likely be fixed in Symfony as well.

I didn't actually run into it in Symfony itself but it seems at least hypothetically possible. Imagine if [here](8c3dc8254a/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php (L77)) `$e` is somehow the same (===) as `$exception`. The code [below](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php#L82-L92) will then find the last exception in the `getPrevious()` chain and assigns `$exception` as the previous. However in the off chance that `$exception` is actually `$e` (the first exception in the chain) then it creates an infinite loop of exceptions which is not good for monolog and exception handlers.

What do you think?

Commits
-------

3447222b68 [HttpKernel] Fix possible infinite loop of exceptions
2019-02-22 09:41:30 +01:00
.composer Drop hirak/prestissimo 2016-05-12 07:44:15 -05:00
.github add xabbuh as code owner of the Form component 2019-02-12 07:44:39 +01:00
src/Symfony bug #30327 [HttpKernel] Fix possible infinite loop of exceptions (enumag) 2019-02-22 09:41:30 +01:00
.appveyor.yml Fix CI 2018-11-29 16:06:32 +01:00
.editorconfig Update .editorconfig 2018-09-06 16:22:56 +02:00
.gitignore Add appveyor.yml for C.I. on Windows 2015-08-25 23:41:37 +02:00
.php_cs.dist switched array() to [] 2019-01-16 10:39:14 +01:00
.travis.yml Use system wide memcached.so 2019-02-01 16:34:59 +01:00
CHANGELOG-3.0.md Merge branch '2.8' into 3.1 2016-08-05 10:37:39 +02:00
CHANGELOG-3.1.md updated CHANGELOG for 3.1.9 2017-01-12 12:43:31 -08:00
CHANGELOG-3.2.md updated CHANGELOG for 3.2.13 2017-08-01 11:40:12 +02:00
CHANGELOG-3.3.md updated CHANGELOG for 3.3.15 2018-01-05 08:28:38 +01:00
CHANGELOG-3.4.md updated CHANGELOG for 3.4.22 2019-02-03 13:22:32 +01:00
CODE_OF_CONDUCT.md Added the Code of Conduct file 2018-10-10 03:13:30 -07:00
CONTRIBUTING.md Mention the community review guide 2016-12-18 22:02:35 +01:00
CONTRIBUTORS.md update CONTRIBUTORS for 3.4.22 2019-02-03 13:22:40 +01:00
LICENSE update year in license files 2019-01-01 14:45:19 +01:00
README.md Merge branch '2.8' into 3.4 2018-05-25 16:50:57 +02:00
UPGRADE-3.0.md Add framework asset changes to upgrade 3.0 guide 2018-11-06 16:58:15 +01:00
UPGRADE-3.1.md [Serializer] Remove AbstractObjectNormalizer::isAttributeToNormalize 2016-12-08 16:02:32 +01:00
UPGRADE-3.2.md Merge branch '2.8' into 3.4 2018-02-22 13:28:57 +01:00
UPGRADE-3.3.md Merge branch '3.3' into 3.4 2017-11-30 15:59:23 +01:00
UPGRADE-3.4.md Merge branch '2.8' into 3.4 2018-05-31 12:13:22 +02:00
UPGRADE-4.0.md Merge branch '2.8' into 3.4 2018-05-31 12:13:22 +02:00
composer.json [DoctrineBridge] allow dev versions of Doctrine again 2018-08-01 17:25:41 +02:00
link Update Repository Symlink Helper 2018-02-11 12:15:02 +01:00
phpunit Bump phpunit bridge cache id 2019-01-24 22:33:33 +01:00
phpunit.xml.dist Merge branch '2.8' into 3.4 2018-11-11 20:48:54 +01:00

README.md

Symfony is a PHP framework for web applications and a set of reusable PHP components. Symfony is used by thousands of web applications (including BlaBlaCar.com and Spotify.com) and most of the popular PHP projects (including Drupal and Magento).

Installation

Documentation

Community

Contributing

Symfony is an Open Source, community-driven project with thousands of contributors. Join them contributing code or contributing documentation.

Security Issues

If you discover a security vulnerability within Symfony, please follow our disclosure procedure.

About Us

Symfony development is sponsored by SensioLabs, led by the Symfony Core Team and supported by Symfony contributors.