8000 minor #58103 [HttpKernel][Security] Minor cleanups (nicolas-grekas) · symfony/symfony@d635044 · GitHub
[go: up one dir, main page]

Skip to content

Commit d635044

Browse files
minor #58103 [HttpKernel][Security] Minor cleanups (nicolas-grekas)
This PR was merged into the 7.2 branch. Discussion ---------- [HttpKernel][Security] Minor cleanups | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT Commits ------- 569bb05 [HttpKernel][Security] Minor cleanups
2 parents 01f2e6e + 569bb05 commit d635044

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function onKernelRequest(RequestEvent $event): void
9393
*/
9494
public function onKernelResponse(ResponseEvent $event): void
9595
{
96-
if (!$event->isMainRequest() || (!$this->container->has('initialized_session') && !$event->getRequest()->hasSession())) {
96+
if (!$event->isMainRequest()) {
9797
return;
9898
}
9999

src/Symfony/Component/Security/Csrf/CsrfTokenManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function __construct(?TokenGeneratorInterface $generator = null, ?TokenSt
4747
if (null === $namespace) {
4848
$this->namespace = $superGlobalNamespaceGenerator;
4949
} elseif ($namespace instanceof RequestStack) {
50-
$this->namespace = function () use ($namespace, $superGlobalNamespaceGenerator) {
50+
$this->namespace = static function () use ($namespace, $superGlobalNamespaceGenerator) {
5151
if ($request = $namespace->getMainRequest()) {
5252
return $request->isSecure() ? 'https-' : '';
5353
}

0 commit comments

Comments
 (0)
0