Skip to content

Commit 2a9ab23

Browse files
committed
Presenter: fixed InvalidLinkException on detectedCsrf() [Closes #300]
1 parent 8838394 commit 2a9ab23

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Application/UI/Presenter.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,11 @@ protected function shutdown(Application\Response $response)
315315
*/
316316
public function detectedCsrf(): void
317317
{
318-
$this->redirect('this');
318+
try {
319+
$this->redirect('this');
320+
} catch (InvalidLinkException $e) {
321+
throw new Nette\Application\BadRequestException($e->getMessage());
322+
}
319323
}
320324

321325

0 commit comments

Comments
 (0)