merged branch Tobion/prevsession (PR #4736)

Commits
-------

4d0ae1f [HttpFoundation] refactored hasPreviousSession

Discussion
----------

[HttpFoundation] refactored hasPreviousSession
This commit is contained in:
Fabien Potencier 2012-07-04 07:16:31 +02:00
commit 8d84e75a75

View File

@ -546,9 +546,7 @@ class Request
public function hasPreviousSession()
{
// the check for $this->session avoids malicious users trying to fake a session cookie with proper name
$sessionName = $this->hasSession() ? $this->session->getName() : null;
return $this->cookies->has($sessionName) && $this->hasSession();
return $this->hasSession() && $this->cookies->has($this->session->getName());
}
/**