Merge branch '3.4' into 4.0

* 3.4:
  simplified code
This commit is contained in:
Fabien Potencier 2018-05-24 17:52:33 +02:00
commit 86f164b6ff
6 changed files with 6 additions and 29 deletions

View File

@ -115,10 +115,6 @@ class GuardAuthenticatorHandler
if (!$request->hasSession() || !$request->hasPreviousSession()) {
return;
}
// Destroying the old session is broken in php 5.4.0 - 5.4.10
// See https://bugs.php.net/63379
$destroy = \PHP_VERSION_ID < 50400 || \PHP_VERSION_ID >= 50411;
$request->getSession()->migrate($destroy);
$request->getSession()->migrate(true);
}
}

View File

@ -123,10 +123,6 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface
if (!$request->hasSession() || !$request->hasPreviousSession()) {
return;
}
// Destroying the old session is broken in php 5.4.0 - 5.4.10
// See https://bugs.php.net/63379
$destroy = \PHP_VERSION_ID < 50400 || \PHP_VERSION_ID >= 50411;
$request->getSession()->migrate($destroy);
$request->getSession()->migrate(true);
}
}

View File

@ -98,10 +98,6 @@ class BasicAuthenticationListener implements ListenerInterface
if (!$request->hasSession() || !$request->hasPreviousSession()) {
return;
}
// Destroying the old session is broken in php 5.4.0 - 5.4.10
// See https://bugs.php.net/63379
$destroy = \PHP_VERSION_ID < 50400 || \PHP_VERSION_ID >= 50411;
$request->getSession()->migrate($destroy);
$request->getSession()->migrate(true);
}
}

View File

@ -121,10 +121,6 @@ class SimplePreAuthenticationListener implements ListenerInterface
if (!$request->hasSession() || !$request->hasPreviousSession()) {
return;
}
// Destroying the old session is broken in php 5.4.0 - 5.4.10
// See https://bugs.php.net/63379
$destroy = \PHP_VERSION_ID < 50400 || \PHP_VERSION_ID >= 50411;
$request->getSession()->migrate($destroy);
$request->getSession()->migrate(true);
}
}

View File

@ -190,9 +190,6 @@ class UsernamePasswordJsonAuthenticationListener implements ListenerInterface
if (!$request->hasSession() || !$request->hasPreviousSession()) {
return;
}
// Destroying the old session is broken in php 5.4.0 - 5.4.10
// See https://bugs.php.net/63379
$destroy = \PHP_VERSION_ID < 50400 || \PHP_VERSION_ID >= 50411;
$request->getSession()->migrate($destroy);
$request->getSession()->migrate(true);
}
}

View File

@ -49,11 +49,7 @@ class SessionAuthenticationStrategy implements SessionAuthenticationStrategyInte
case self::MIGRATE:
// Note: this logic is duplicated in several authentication listeners
// until Symfony 5.0 due to a security fix with BC compat
// Destroying the old session is broken in php 5.4.0 - 5.4.10
// See https://bugs.php.net/63379
$destroy = \PHP_VERSION_ID < 50400 || \PHP_VERSION_ID >= 50411;
$request->getSession()->migrate($destroy);
$request->getSession()->migrate(true);
return;