commit 58093305a2e81b71ed7082be111b1c628144ed4d
parent 9668430fe7cf10fcb9d8c31f6c68268c0ebcba44
Author: markseu <mark2011@mayberg.se>
Date: Tue, 16 Feb 2016 23:10:16 +0100
Web interface update (for George)
Diffstat:
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/system/plugins/webinterface.php b/system/plugins/webinterface.php
@@ -5,7 +5,7 @@
// Web interface plugin
class YellowWebinterface
{
- const Version = "0.6.2";
+ const Version = "0.6.3";
var $yellow; //access to API
var $active; //web interface is active? (boolean)
var $userLoginFailed; //web interface login failed? (boolean)
@@ -665,9 +665,7 @@ class YellowUsers
$location = $this->yellow->config->get("serverBase").$this->yellow->config->get("webinterfaceLocation");
$session = $this->yellow->toolbox->createHash($this->users[$email]["hash"], "sha256");
if(empty($session)) $session = "error-hash-algorithm-sha256";
- $domain = ($pos = strposu($serverName, ':')) ? substru($serverName, 0, $pos) : $serverName;
- if($domain == "localhost") $domain = false;
- setcookie($cookieName, "$email,$session", time()+60*60*24*30*365, $location, $domain, $serverScheme=="https");
+ setcookie($cookieName, "$email,$session", time()+60*60*24*30*365, $location, "", $serverScheme=="https");
}
}
@@ -677,9 +675,7 @@ class YellowUsers
$serverScheme = $this->yellow->config->get("webinterfaceServerScheme");
$serverName = $this->yellow->config->get("webinterfaceServerName");
$location = $this->yellow->config->get("serverBase").$this->yellow->config->get("webinterfaceLocation");
- $domain = ($pos = strposu($serverName, ':')) ? substru($serverName, 0, $pos) : $serverName;
- if($domain == "localhost") $domain = false;
- setcookie($cookieName, "", time()-3600, $location, $domain, $serverScheme=="https");
+ setcookie($cookieName, "", time()-3600, $location, "", $serverScheme=="https");
}
// Return information from browser cookie