mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

commit dcf51e2e14849ba69aa940a82678a3396cde55f2
parent 26dc4670824966d2c0ae29aa50b7fa3868462cca
Author: markseu <mark2011@mayberg.se>
Date:   Tue, 16 Feb 2016 16:19:29 +0100

Web interface update (for George)

Diffstat:
Msystem/plugins/webinterface.php | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/system/plugins/webinterface.php b/system/plugins/webinterface.php @@ -666,7 +666,7 @@ class YellowUsers $expire = time()+60*60*24*30*365; $session = $this->yellow->toolbox->createHash($this->users[$email]["hash"], "sha256"); if(empty($session)) $session = "error-hash-algorithm-sha256"; - if($serverName == "localhost") $serverName = false; + if(preg_match("/^localhost(:\d+)?$/", $serverName)) $serverName = false; setcookie($cookieName, "$email,$session", $expire, $location, $serverName, $serverScheme=="https"); } } @@ -677,7 +677,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"); - if($serverName == "localhost") $serverName = false; + if(preg_match("/^localhost(:\d+)?$/", $serverName)) $serverName = false; setcookie($cookieName, "", time()-3600, $location, $serverName, $serverScheme=="https"); }