From 4d0ae1fb0c7be5c7ead18b335481c30f87ee9d1d Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Wed, 4 Jul 2012 03:41:37 +0200 Subject: [PATCH] [HttpFoundation] refactored hasPreviousSession --- src/Symfony/Component/HttpFoundation/Request.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index afab299767..0cc341fc3b 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -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()); } /**