Skip to content

Commit 2a8e0ab

Browse files
Merge branch '6.4' into 7.3
* 6.4: Replace backtick operator, deprecated in PHP 8.5, with shell_exec() [DependencyInjection] Add test case to ensure XML parse exception message includes filename and position [Serializer] Fix normalizing objects with accessors having the same name as a property [SecurityBundle] Prevent accessing the tracked token storage when collecting data
2 parents fbecca9 + 4a6a832 commit 2a8e0ab

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

DataCollector/SecurityDataCollector.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,12 @@ public function collect(Request $request, Response $response, ?\Throwable $excep
101101
}
102102

103103
$logoutUrl = null;
104-
try {
105-
$logoutUrl = $this->logoutUrlGenerator?->getLogoutPath();
106-
} catch (\Exception) {
107-
// fail silently when the logout URL cannot be generated
104+
if ($this->logoutUrlGenerator && method_exists($token, 'getFirewallName')) {
105+
try {
106+
$logoutUrl = $this->logoutUrlGenerator->getLogoutPath($token->getFirewallName());
107+
} catch (\Exception) {
108+
// fail silently when the logout URL cannot be generated
109+
}
108110
}
109111

110112
$this->data = [

0 commit comments

Comments
 (0)