Skip to content
Snippets Groups Projects
Commit cd6278cc authored by Jaime Pérez's avatar Jaime Pérez
Browse files

Set the session name explicitly in SessionHandlerPHP, even when we are using the default value.

parent 067398e8
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,7 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler ...@@ -42,7 +42,7 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler
parent::__construct(); parent::__construct();
$config = SimpleSAML_Configuration::getInstance(); $config = SimpleSAML_Configuration::getInstance();
$this->cookie_name = $config->getString('session.phpsession.cookiename', null); $this->cookie_name = $config->getString('session.phpsession.cookiename', ini_get('session.name'));
if (function_exists('session_status') && defined('PHP_SESSION_ACTIVE')) { // PHP >= 5.4 if (function_exists('session_status') && defined('PHP_SESSION_ACTIVE')) { // PHP >= 5.4
$previous_session = session_status() === PHP_SESSION_ACTIVE; $previous_session = session_status() === PHP_SESSION_ACTIVE;
...@@ -61,11 +61,7 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler ...@@ -61,11 +61,7 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler
session_write_close(); session_write_close();
} }
if (!empty($this->cookie_name)) { session_name($this->cookie_name);
session_name($this->cookie_name);
} else {
$this->cookie_name = session_name();
}
$params = $this->getCookieParams(); $params = $this->getCookieParams();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment