forked from symfony/symfony
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
security #cve-2021-32693 [SecurityHttp] Fix "Authentication granted w…
…ith multiple firewalls" (wouterj) This PR was merged into the 5.3 branch.
- Loading branch information
Showing
6 changed files
with
44 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,4 +87,17 @@ public function provideEmailsWithFirewalls() | |
yield ['[email protected]', 'main']; | ||
yield ['[email protected]', 'custom']; | ||
} | ||
|
||
public function testMultipleFirewalls() | ||
{ | ||
$client = $this->createClient(['test_case' => 'Authenticator', 'root_config' => 'multiple_firewalls.yml']); | ||
|
||
$client->request('POST', '/firewall1/login', [ | ||
'_username' => '[email protected]', | ||
'_password' => 'test', | ||
]); | ||
|
||
$client->request('GET', '/firewall2/profile'); | ||
$this->assertResponseRedirects('http://localhost/login'); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Authenticator/multiple_firewalls.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
imports: | ||
- { resource: ./config.yml } | ||
- { resource: ./security.yml } | ||
|
||
security: | ||
enable_authenticator_manager: true | ||
firewalls: | ||
firewall1: | ||
pattern: /firewall1 | ||
provider: in_memory | ||
form_login: | ||
check_path: /firewall1/login | ||
firewall2: | ||
pattern: /firewall2 | ||
provider: in_memory2 | ||
form_login: | ||
check_path: /firewall2/login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters