Skip to content
Snippets Groups Projects
Commit e06bda12 authored by Graham Cole's avatar Graham Cole
Browse files

work around the fact that PHP bizarrely prepends a dot to specified cookie domain names

parent ead753dc
No related branches found
No related tags found
No related merge requests found
......@@ -34,11 +34,11 @@ private $datahash=''; // hash of data field
// Create a new (insecure) session
private function newsession()
{
global $DB;
global $DB, $preferred_hostname;
$token = $this->genSessionID();
$DB->Execute("insert into {$this->table} (hash, lastseen, ip) values (?,NOW(),?)", array($token, $_SERVER['REMOTE_ADDR']));
setcookie("sucssite_session", $token, NULL, "/");
setcookie("sucssite_session", $token, NULL, "/", $preferred_hostname);
$this->token = $token;
return;
}
......
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