Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Commit

Permalink
JSession still uses JRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
florianv committed May 2, 2012
1 parent 5d1a16c commit 53ec308
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions libraries/joomla/session/session.php
Expand Up @@ -9,8 +9,6 @@

defined('JPATH_PLATFORM') or die;

jimport('joomla.environment.request');

/**
* Class for managing HTTP sessions
*
Expand Down Expand Up @@ -523,12 +521,19 @@ protected function _start()
else
{
$session_name = session_name();
if (!JRequest::getVar($session_name, false, 'COOKIE'))

// Get the JInput object
$input = JFactory::getApplication()->input;

// Get the JInputCookie object
$cookie = $input->cookie;

if(is_null($cookie->get($session_name)))
{
if (JRequest::getVar($session_name))
if($session_clean = $input->get($session_name, false, 'string'))
{
session_id(JRequest::getVar($session_name));
setcookie($session_name, '', time() - 3600);
session_id($session_clean);
$cookie->set($session_name, '', time() - 3600);
}
}
}
Expand Down

0 comments on commit 53ec308

Please sign in to comment.