Merge branch '4.0' into 4.1
* 4.0: simplified code
This commit is contained in:
commit
ccd5c278db
@ -115,10 +115,6 @@ class GuardAuthenticatorHandler
|
|||||||
if (!$request->hasSession() || !$request->hasPreviousSession()) {
|
if (!$request->hasSession() || !$request->hasPreviousSession()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$request->getSession()->migrate(true);
|
||||||
// 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,10 +123,6 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface
|
|||||||
if (!$request->hasSession() || !$request->hasPreviousSession()) {
|
if (!$request->hasSession() || !$request->hasPreviousSession()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$request->getSession()->migrate(true);
|
||||||
// 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,10 +98,6 @@ class BasicAuthenticationListener implements ListenerInterface
|
|||||||
if (!$request->hasSession() || !$request->hasPreviousSession()) {
|
if (!$request->hasSession() || !$request->hasPreviousSession()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$request->getSession()->migrate(true);
|
||||||
// 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,10 +121,6 @@ class SimplePreAuthenticationListener implements ListenerInterface
|
|||||||
if (!$request->hasSession() || !$request->hasPreviousSession()) {
|
if (!$request->hasSession() || !$request->hasPreviousSession()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$request->getSession()->migrate(true);
|
||||||
// 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,9 +190,6 @@ class UsernamePasswordJsonAuthenticationListener implements ListenerInterface
|
|||||||
if (!$request->hasSession() || !$request->hasPreviousSession()) {
|
if (!$request->hasSession() || !$request->hasPreviousSession()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Destroying the old session is broken in php 5.4.0 - 5.4.10
|
$request->getSession()->migrate(true);
|
||||||
// See https://bugs.php.net/63379
|
|
||||||
$destroy = \PHP_VERSION_ID < 50400 || \PHP_VERSION_ID >= 50411;
|
|
||||||
$request->getSession()->migrate($destroy);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,11 +49,7 @@ class SessionAuthenticationStrategy implements SessionAuthenticationStrategyInte
|
|||||||
case self::MIGRATE:
|
case self::MIGRATE:
|
||||||
// Note: this logic is duplicated in several authentication listeners
|
// Note: this logic is duplicated in several authentication listeners
|
||||||
// until Symfony 5.0 due to a security fix with BC compat
|
// until Symfony 5.0 due to a security fix with BC compat
|
||||||
|
$request->getSession()->migrate(true);
|
||||||
// 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);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user