commit e93d1e40cfe2323261feb6e300a7d5cded4d8f3c
parent bc8b86ffad6c33201178f9238753ad3c7633aa27
Author: wunderfeyd <wunderfeyd@datenstrom.se>
Date: Sun, 13 Dec 2015 10:02:43 +0100
Speedipus-rex
Diffstat:
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/system/config/config.ini b/system/config/config.ini
@@ -42,7 +42,8 @@ Parser: markdown
ParserSafeMode: 0
MultiLanguageMode: 0
WebinterfaceLocation: /edit/
-WebinterfaceServerScheme: http
+# WebinterfaceServerScheme: http
+# WebinterfaceServerName: your.domain.name
WebinterfaceUserHashAlgorithm: bcrypt
WebinterfaceUserHashCost: 10
WebinterfaceUserHome: /
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.1";
+ const Version = "0.6.2";
var $yellow; //access to API
var $active; //web interface is active? (boolean)
var $userLoginFailed; //web interface login failed? (boolean)
@@ -22,7 +22,7 @@ class YellowWebinterface
$this->users = new YellowUsers($yellow);
$this->merge = new YellowMerge($yellow);
$this->yellow->config->setDefault("webinterfaceLocation", "/edit/");
- $this->yellow->config->setDefault("webinterfaceServerScheme", "http");
+ $this->yellow->config->setDefault("webinterfaceServerScheme", $this->yellow->config->get("serverScheme"));
$this->yellow->config->setDefault("webinterfaceServerName", $this->yellow->config->get("serverName"));
$this->yellow->config->setDefault("webinterfaceUserHashAlgorithm", "bcrypt");
$this->yellow->config->setDefault("webinterfaceUserHashCost", "10");
@@ -618,8 +618,9 @@ class YellowUsers
{
foreach($fileData as $line)
{
- preg_match("/^(.*?)\s*:\s*(.*?),\s*(.*?),\s*(.*?),\s*(.*?)\s*$/", $line, $matches);
- if(!empty($matches[1]) && !empty($matches[2]) && !empty($matches[3]) && !empty($matches[4]))
+ preg_match("/^(.*?)\s*:\s*(.*?),\s*(.*?),\s*(.*?),\s*(.*?),\s*(.*?)\s*$/", $line, $matches);
+ if(!empty($matches[1]) && !empty($matches[2]) && !empty($matches[3]) && !empty($matches[4]) &&
+ !empty($matches[5]) && !empty($matches[6]))
{
if($matches[1] == $email)
{