瀏覽代碼

Speedipus-rex

wunderfeyd 9 年之前
父節點
當前提交
e93d1e40cf
共有 2 個文件被更改,包括 7 次插入5 次删除
  1. 2 1
      system/config/config.ini
  2. 5 4
      system/plugins/webinterface.php

+ 2 - 1
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: /

+ 5 - 4
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)
 					{