Protect tag_delete with a CSRF token

This commit is contained in:
Yassine Guedidi
2025-03-23 14:51:58 +01:00
parent cf49be6940
commit 27f0d94db7
4 changed files with 15 additions and 6 deletions

View File

@ -168,8 +168,8 @@ class TagControllerTest extends WallabagCoreTestCase
$this->getEntityManager()->clear();
$crawler = $client->request('GET', '/tag/list');
$link = $crawler->filter('a[id="delete-' . $tag->getSlug() . '"]')->link();
$client->click($link);
$form = $crawler->filter('#tag-' . $tag->getId())->selectButton('delete')->form();
$client->submit($form);
$tag = $client->getContainer()
->get(EntityManagerInterface::class)