From 42311d5c29a47c17ca2bf7620f5dfc39e8482186 Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Wed, 1 Apr 2020 11:15:47 +0200 Subject: [PATCH] [Security][Http][SwitchUserListener] Ignore all non existent username protection errors --- .../Component/Security/Http/Firewall/SwitchUserListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php b/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php index 21bd1bc1cdb0..a6718a723282 100644 --- a/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php @@ -168,7 +168,7 @@ private function attemptSwitchUser(Request $request, string $username): ?TokenIn try { $this->provider->loadUserByUsername($nonExistentUsername); - } catch (AuthenticationException $e) { + } catch (\Exception $e) { } } catch (AuthenticationException $e) { $this->provider->loadUserByUsername($currentUsername);