Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 09ded4f

Browse filesBrowse files
committed
fabbot.io patch
1 parent f1b53a2 commit 09ded4f
Copy full SHA for 09ded4f

File tree

Expand file treeCollapse file tree

1 file changed

+12
-12
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-12
lines changed

‎src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php
+12-12Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,48 +88,48 @@ public function onKernelException(GetResponseForExceptionEvent $event)
8888
if (null !== $this->logger) {
8989
$this->logger->info(sprintf('Authentication exception occurred; redirecting to authentication entry point (%s)', $exception->getMessage()));
9090
}
91-
91+
9292
try {
9393
$response = $this->startAuthentication($request, $exception);
9494
} catch (\Exception $e) {
9595
$event->setException($e);
96-
96+
9797
return;
9898
}
9999
} elseif ($exception instanceof AccessDeniedException) {
100100
$event->setException(new AccessDeniedHttpException($exception->getMessage(), $exception));
101-
101+
102102
$token = $this->context->getToken();
103103
if (!$this->authenticationTrustResolver->isFullFledged($token)) {
104104
if (null !== $this->logger) {
105105
$this->logger->debug(sprintf('Access is denied (user is not fully authenticated) by "%s" at line %s; redirecting to authentication entry point', $exception->getFile(), $exception->getLine()));
106106
}
107-
107+
108108
try {
109109
$insufficientAuthenticationException = new InsufficientAuthenticationException('Full authentication is required to access this resource.', 0, $exception);
110110
$insufficientAuthenticationException->setToken($token);
111111
$response = $this->startAuthentication($request, $insufficientAuthenticationException);
112112
} catch (\Exception $e) {
113113
$event->setException($e);
114-
114+
115115
return;
116116
}
117117
} else {
118118
if (null !== $this->logger) {
119119
$this->logger->debug(sprintf('Access is denied (and user is neither anonymous, nor remember-me) by "%s" at line %s', $exception->getFile(), $exception->getLine()));
120120
}
121-
121+
122122
try {
123123
if (null !== $this->accessDeniedHandler) {
124124
$response = $this->accessDeniedHandler->handle($request, $exception);
125-
125+
126126
if (!$response instanceof Response) {
127127
return;
128128
}
129129
} elseif (null !== $this->errorPage) {
130130
$subRequest = $this->httpUtils->createRequest($request, $this->errorPage);
131131
$subRequest->attributes->set(SecurityContextInterface::ACCESS_DENIED_ERROR, $exception);
132-
132+
133133
$response = $event->getKernel()->handle($subRequest, HttpKernelInterface::SUB_REQUEST, true);
134134
} else {
135135
return;
@@ -138,20 +138,20 @@ public function onKernelException(GetResponseForExceptionEvent $event)
138138
if (null !== $this->logger) {
139139
$this->logger->error(sprintf('Exception thrown when handling an exception (%s: %s)', get_class($e), $e->getMessage()));
140140
}
141-
141+
142142
$event->setException(new \RuntimeException('Exception thrown when handling an exception.', 0, $e));
143-
143+
144144
return;
145145
}
146146
}
147147
} elseif ($exception instanceof LogoutException) {
148148
if (null !== $this->logger) {
149149
$this->logger->info(sprintf('Logout exception occurred; wrapping with AccessDeniedHttpException (%s)', $exception->getMessage()));
150150
}
151-
151+
152152
return;
153153
} else {
154-
if (null === $exception->getPrevious()){
154+
if (null === $exception->getPrevious()) {
155155
return;
156156
}
157157
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.