1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-06-27 16:36:00 +00:00

Protect share with a CSRF token

This commit is contained in:
Yassine Guedidi 2025-03-23 12:52:16 +01:00
parent eb8408b22f
commit 0d8429dfc7
4 changed files with 19 additions and 7 deletions

View file

@ -1155,7 +1155,10 @@ class EntryControllerTest extends WallabagCoreTestCase
$this->assertSame(404, $client->getResponse()->getStatusCode());
// generating the uid
$client->request('GET', '/share/' . $content->getId());
$crawler = $client->request('GET', '/view/' . $content->getId());
$client->submit($crawler->filter('.left-bar')->selectButton('entry.view.left_menu.public_link')->form());
$this->assertSame(302, $client->getResponse()->getStatusCode());
$shareUrl = $client->getResponse()->getTargetUrl();