Skip to content
Snippets Groups Projects
Commit a39f0899 authored by Jared Hancock's avatar Jared Hancock
Browse files

Use a non-standard session cookie name

Which will help against clobbering session cookies against other PHP
applications shared on a parent domain of the domain hosting osTicket or in
a parent folder or virtual folder.
parent d025d080
Branches
Tags
No related merge requests found
......@@ -66,11 +66,10 @@ class Config {
return $this->session[$key];
elseif (isset($this->config[$key]))
return $this->config[$key]['value'];
elseif ($default !== null)
return $this->set($key, $default);
elseif (isset($this->defaults[$key]))
return $this->defaults[$key];
return null;
return $default;
}
function exists($key) {
......
......@@ -21,7 +21,6 @@ class osTicketSession {
var $id = '';
function osTicketSession($ttl=0){
$this->ttl =$ttl?$ttl:get_cfg_var('session.gc_maxlifetime');
if(!$this->ttl)
$this->ttl=SESSION_TTL;
......@@ -40,6 +39,7 @@ class osTicketSession {
register_shutdown_function('session_write_close');
}
//Start the session.
session_name('OSTSESSID');
session_start();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment