Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
[Security/Http] fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed May 28, 2020
1 parent 76089a5 commit 21d84ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Http/Firewall/ExceptionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private function handleAccessDeniedException(GetResponseForExceptionEvent $event

private function handleLogoutException(GetResponseForExceptionEvent $event, LogoutException $exception): void
{
$event->setException(new AccessDeniedHttpException($exception->getMessage(), $exception));
$event->setThrowable(new AccessDeniedHttpException($exception->getMessage(), $exception));

if (null !== $this->logger) {
$this->logger->info('A LogoutException was thrown; wrapping with AccessDeniedHttpException', ['exception' => $exception]);
Expand Down
4 changes: 2 additions & 2 deletions Http/Tests/Firewall/ExceptionListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ public function testLogoutException()
$listener = $this->createExceptionListener();
$listener->onKernelException($event);

$this->assertEquals('Invalid CSRF.', $event->getException()->getMessage());
$this->assertEquals(403, $event->getException()->getStatusCode());
$this->assertEquals('Invalid CSRF.', $event->getThrowable()->getMessage());
$this->assertEquals(403, $event->getThrowable()->getStatusCode());
}

public function getAccessDeniedExceptionProvider()
Expand Down

0 comments on commit 21d84ee

Please sign in to comment.