Skip to content

Commit 4dc39ad

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Security][WIP] Add authenticators info to the profiler [Translation] Use symfony default locale when pulling translations from providers added missing translations for Bosnian (bs) Add the missing greek translations for security core and validator component [HttpKernel] Fix return types in `EventDataCollector` Do not call substr_count() if ip is null to avoid deprecation warning in PHP 8.1 [Security][Validator] Add missing translations for Slovenian (sl) [Messenger] Add worker metadata inside logs [Messenger] Log when worker should stop and when `SIGTERM` is received cs fix [Security][Validator] Add missing translations for Finnish (fi) [VarDumper] returns a 500 when dd() is executed chore(VarDumper): declare that dd() never returns [MonologBridge] Deprecate the Swiftmailer handler [Cache] Commit items implicitly only when deferred keys are requested [MonologBridge] Deprecates ResetLoggersWorkerSubscriber Fix "can not" spelling [HttpClient] fix missing kernel.reset tag on TraceableHttpClient services [Form] Fix ChoiceType Extension to effectively set and use the translator Added new CssColor constraint
2 parents ce163bd + 344e7e7 commit 4dc39ad

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Authentication/AuthenticatorManager.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public function supports(Request $request): ?bool
9898
}
9999

100100
$authenticators = [];
101+
$skippedAuthenticators = [];
101102
$lazy = true;
102103
foreach ($this->authenticators as $authenticator) {
103104
if (null !== $this->logger) {
@@ -107,8 +108,11 @@ public function supports(Request $request): ?bool
107108
if (false !== $supports = $authenticator->supports($request)) {
108109
$authenticators[] = $authenticator;
109110
$lazy = $lazy && null === $supports;
110-
} elseif (null !== $this->logger) {
111-
$this->logger->debug('Authenticator does not support the request.', ['firewall_name' => $this->firewallName, 'authenticator' => \get_class($authenticator)]);
111+
} else {
112+
if (null !== $this->logger) {
113+
$this->logger->debug('Authenticator does not support the request.', ['firewall_name' => $this->firewallName, 'authenticator' => \get_class($authenticator)]);
114+
}
115+
$skippedAuthenticators[] = $authenticator;
112116
}
113117
}
114118

@@ -117,6 +121,7 @@ public function supports(Request $request): ?bool
117121
}
118122

119123
$request->attributes->set('_security_authenticators', $authenticators);
124+
$request->attributes->set('_security_skipped_authenticators', $skippedAuthenticators);
120125

121126
return $lazy ? null : true;
122127
}
@@ -125,6 +130,8 @@ public function authenticateRequest(Request $request): ?Response
125130
{
126131
$authenticators = $request->attributes->get('_security_authenticators');
127132
$request->attributes->remove('_security_authenticators');
133+
$request->attributes->remove('_security_skipped_authenticators');
134+
128135
if (!$authenticators) {
129136
return null;
130137
}

0 commit comments

Comments
 (0)