feat: harden the myep OAuth2 login
This commit is contained in:
1 parent
4517b84023
commit
91419294b8
25 files changed
+1013
-35
No files matched your search
@@ -70,7 +70,8 @@ class DashboardControllerTest extends WebTestCase
|
||||
$crawler = $this->client->request('GET', '/');
|
||||
|
||||
self::assertCount(0, $crawler->filter('#mobilenav'));
|
||||
self::assertCount(1, $crawler->filter('a[href="/logout"]'));
|
||||
// The way out is a form, not a link: the firewall's logout is CSRF-protected.
|
||||
self::assertCount(1, $crawler->filter('form[action="/logout"]'));
|
||||
}
|
||||
|
||||
public function testATileCountsWhatIsStillFreeToday(): void
|
||||
|
||||
@@ -51,7 +51,11 @@ class LogoutAuditTest extends WebTestCase
|
||||
$this->em->flush();
|
||||
|
||||
$this->client->loginUser($user);
|
||||
$this->client->request('GET', '/logout');
|
||||
|
||||
// Submitted from the page rather than requested directly: the firewall's logout is
|
||||
// CSRF-protected, so the token in the header form is part of what is being pinned down.
|
||||
$crawler = $this->client->request('GET', '/');
|
||||
$this->client->submit($crawler->filter('form[action$="/logout"]')->form());
|
||||
|
||||
self::assertResponseRedirects();
|
||||
|
||||
|
||||
Reference in new issue
Block a user