Speedipus-rex

This commit is contained in:
wunderfeyd 2015-12-13 10:02:43 +01:00
parent bc8b86ffad
commit e93d1e40cf
2 changed files with 7 additions and 5 deletions

View file

@ -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: /

View file

@ -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)
{