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.
symfony/src/Symfony/Component/Security/Http
Fabien Potencier 6e75cee83e bug #22732 [Security] fix switch user _exit without having current token (dmaicher)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] fix switch user _exit without having current token

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

Attempting to `_exit` from a switched user caused an error when not having any token in the storage (for example happens when not logged in + disallowing anonymous users on that firewall):

`[1] Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 1 passed to Symfony\Component\Security\Http\Firewall\SwitchUserListener::getOriginalToken()
        must be an instance of Symfony\Component\Security\Core\Authentication\Token\TokenInterface, null given, called in
        symfony/symfony/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php on line 164`

Commits
-------

16da6861be [Security] fix switch user _exit without having current token
2017-06-19 11:57:05 -07:00
..
Authentication Fix the retrieval of the last username when using forwarding 2016-07-11 11:55:50 +02:00
Authorization Fix: duplicate usage of Symfony\Component\HttpFoundation\Response 2013-10-01 16:15:07 +02:00
EntryPoint Merge branch '2.3' into 2.7 2015-12-15 02:31:17 +01:00
Event [2.3] CS And DocBlock Fixes 2014-12-22 16:58:09 +01:00
Firewall [Security] fix switch user _exit without having current token 2017-05-17 20:41:55 +02:00
Logout [Security] Avoid unnecessary route lookup for empty logout path 2017-04-29 20:08:02 +02:00
RememberMe [Security] Added option to return true in the method isRememberMeRequested 2017-03-16 00:06:02 +02:00
Session Using FQ name for PHP_VERSION_ID 2017-06-01 13:44:56 -07:00
Tests bug #22732 [Security] fix switch user _exit without having current token (dmaicher) 2017-06-19 11:57:05 -07:00
.gitignore [Security] Split the component into 3 sub-components Core, ACL, HTTP 2013-09-18 09:16:41 +02:00
AccessMap.php Merge branch '2.3' into 2.4 2014-04-16 10:02:57 +02:00
AccessMapInterface.php fixed CS 2012-07-09 14:54:20 +02:00
composer.json [Security] fix Composer constraint 2017-03-04 12:40:30 +01:00
Firewall.php Merge branch '2.3' into 2.4 2014-04-16 10:02:57 +02:00
FirewallMap.php made {@inheritdoc} annotations consistent across the board 2014-04-16 09:04:20 +02:00
FirewallMapInterface.php [Security] fix typo 2013-09-18 17:42:47 +02:00
HttpUtils.php Merge branch '2.3' into 2.5 2014-12-04 09:55:19 +01:00
LICENSE updated LICENSE year 2017-01-02 12:30:00 -08:00
phpunit.xml.dist unify PHPUnit config files 2017-04-12 21:20:43 +02:00
README.md [2.7] update readme files for new components 2016-03-07 12:06:07 +01:00
SecurityEvents.php Add machine readable events 2014-11-16 18:21:02 +01:00

Security Component - HTTP Integration

Security provides an infrastructure for sophisticated authorization systems, which makes it possible to easily separate the actual authorization logic from so called user providers that hold the users credentials. It is inspired by the Java Spring framework.

Resources