merged branch Tobion/prevsession (PR #4736)
Commits
-------
4d0ae1f
[HttpFoundation] refactored hasPreviousSession
Discussion
----------
[HttpFoundation] refactored hasPreviousSession
This commit is contained in:
commit
8d84e75a75
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user