improve csrf handling (#2936)

This commit is contained in:
Kevin Papst
2021-11-16 10:17:26 +01:00
committed by GitHub
parent a1992494d3
commit 95796ab256
15 changed files with 122 additions and 34 deletions

View File

@@ -395,7 +395,9 @@ class InvoiceControllerTest extends ControllerBaseTest
$template = $this->importFixture($fixture);
$id = $template[0]->getId();
$this->request($client, '/invoice/template/' . $id . '/delete');
$token = self::$container->get('security.csrf.token_manager')->getToken('invoice.delete_template');
$this->request($client, '/invoice/template/' . $id . '/delete/' . $token);
$this->assertIsRedirect($client, '/invoice/template');
$client->followRedirect();