Skip to content

Commit 76c700a

Browse files
Merge branch '4.4' into 5.0
* 4.4: (30 commits) [Security] Check UserInterface::getPassword is not null before calling needsRehash gracefully handle missing event dispatchers Fix TokenStorage::reset not called in stateless firewall [DotEnv] Remove `usePutEnv` property default value [HttpFoundation] get currently session.gc_maxlifetime if ttl doesnt exists Set up typo fix [DependencyInjection] Handle env var placeholders in CheckTypeDeclarationsPass [Cache] fix memory leak when using PhpArrayAdapter [Validator] Allow underscore character "_" in URL username and password [TwigBridge] Update bootstrap_4_layout.html.twig [FrameworkBundle][SodiumVault] Create secrets directory only when needed fix parsing negative octal numbers [SecurityBundle] Passwords are not encoded when algorithm set to \"true\" [DependencyInjection] Resolve expressions in CheckTypeDeclarationsPass [SecurityBundle] Properly escape regex in AddSessionDomainConstraintPass do not validate passwords when the hash is null [DI] fix resolving bindings for named TypedReference [Config] never try loading failed classes twice with ClassExistenceResource [Mailer] Fix SMTP Authentication when using STARTTLS [DI] Fix making the container path-independent when the app is in /app ...
2 parents aa89f67 + c9d11ea commit 76c700a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Firewall/ContextListener.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,13 @@ public function __construct(TokenStorageInterface $tokenStorage, iterable $userP
6666
$this->userProviders = $userProviders;
6767
$this->sessionKey = '_security_'.$contextKey;
6868
$this->logger = $logger;
69-
$this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
69+
70+
if (null !== $dispatcher && class_exists(LegacyEventDispatcherProxy::class)) {
71+
$this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
72+
} else {
73+
$this->dispatcher = $dispatcher;
74+
}
75+
7076
$this->trustResolver = $trustResolver ?: new AuthenticationTrustResolver(AnonymousToken::class, RememberMeToken::class);
7177
$this->sessionTrackerEnabler = $sessionTrackerEnabler;
7278
}

0 commit comments

Comments
 (0)