mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 12:20:44 +02:00
Installation tweaks/fixes.
This commit is contained in:
@@ -258,46 +258,19 @@ class e_parse
|
||||
private $nodesToDisableSC = array();
|
||||
private $pathList = array();
|
||||
|
||||
private $allowedAttributes = array(
|
||||
'default' => array('id', 'style', 'class', 'title', 'lang', 'accesskey'),
|
||||
'img' => array('src', 'alt', 'width', 'height'),
|
||||
'a' => array('href', 'target', 'rel'),
|
||||
'script' => array('type', 'src', 'language', 'async'),
|
||||
'iframe' => array('src', 'frameborder', 'width', 'height'),
|
||||
'input' => array('type', 'name', 'value'),
|
||||
'form' => array('action', 'method', 'target'),
|
||||
'audio' => array('src', 'controls', 'autoplay', 'loop', 'muted', 'preload'),
|
||||
'video' => array('autoplay', 'controls', 'height', 'loop', 'muted', 'poster', 'preload', 'src', 'width'),
|
||||
'td' => array('colspan', 'rowspan'),
|
||||
'th' => array('colspan', 'rowspan'),
|
||||
'col' => array('span'),
|
||||
'embed' => array('src', 'wmode', 'type', 'width', 'height'),
|
||||
'x-bbcode' => array('alt'),
|
||||
'label' => array('for'),
|
||||
'source' => array('media', 'sizes', 'src', 'srcset', 'type'),
|
||||
private $allowedAttributes = array();
|
||||
|
||||
);
|
||||
|
||||
private $badAttrValues = array('javascript[\s]*?:', 'alert\(', 'vbscript[\s]*?:', 'data:text\/html', 'mhtml[\s]*?:', 'data:[\s]*?image');
|
||||
private $badAttrValues = array();
|
||||
|
||||
private $replaceAttrValues = array(
|
||||
'default' => array()
|
||||
);
|
||||
private $replaceAttrValues = array();
|
||||
|
||||
private $allowedTags = array('html', 'body', 'div', 'a', 'img', 'table', 'tr', 'td', 'th', 'tbody', 'thead', 'colgroup', 'b',
|
||||
'i', 'pre', 'code', 'strong', 'u', 'em', 'ul', 'ol', 'li', 'img', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p',
|
||||
'div', 'pre', 'section', 'article', 'blockquote', 'hgroup', 'aside', 'figure', 'figcaption', 'abbr', 'span', 'audio', 'video', 'source', 'br',
|
||||
'small', 'caption', 'noscript', 'hr', 'section', 'iframe', 'sub', 'sup', 'cite', 'x-bbcode', 'label'
|
||||
);
|
||||
private $scriptTags = array('script', 'applet', 'form', 'input', 'button', 'embed', 'object', 'ins', 'select', 'textarea'); //allowed when $pref['post_script'] is enabled.
|
||||
private $allowedTags = array();
|
||||
private $scriptTags = array();
|
||||
|
||||
private $scriptAttributes = array('onclick', 'onchange', 'onblur', 'onload', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup',
|
||||
'ondblclick', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel',
|
||||
'onwheel', 'oncopy', 'oncut', 'onpaste'
|
||||
);
|
||||
|
||||
private $blockTags = array('p', 'pre', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote'); // element includes its own line-break.
|
||||
private $scriptAttributes = array();
|
||||
|
||||
private $blockTags = array();
|
||||
|
||||
private $scriptAccess = false; // nobody.
|
||||
|
||||
@@ -3413,6 +3386,47 @@ class e_parse
|
||||
$this->e_SuperMods[$key]['context'] = $key;
|
||||
}
|
||||
|
||||
$this->allowedTags = array('html', 'body', 'div', 'a', 'img', 'table', 'tr', 'td', 'th', 'tbody', 'thead', 'colgroup', 'b',
|
||||
'i', 'pre', 'code', 'strong', 'u', 'em', 'ul', 'ol', 'li', 'img', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p',
|
||||
'section', 'article', 'blockquote', 'hgroup', 'aside', 'figure', 'figcaption', 'abbr', 'span', 'audio', 'video', 'source', 'br',
|
||||
'small', 'caption', 'noscript', 'hr', 'section', 'iframe', 'sub', 'sup', 'cite', 'x-bbcode', 'label'
|
||||
);
|
||||
|
||||
$this->scriptTags = array('script', 'applet', 'form', 'input', 'button', 'embed', 'object', 'ins', 'select', 'textarea'); //allowed when $pref['post_script'] is enabled.
|
||||
|
||||
$this->allowedAttributes = array(
|
||||
'default' => array('id', 'style', 'class', 'title', 'lang', 'accesskey'),
|
||||
'img' => array('src', 'alt', 'width', 'height'),
|
||||
'a' => array('href', 'target', 'rel'),
|
||||
'script' => array('type', 'src', 'language', 'async'),
|
||||
'iframe' => array('src', 'frameborder', 'width', 'height'),
|
||||
'input' => array('type', 'name', 'value'),
|
||||
'form' => array('action', 'method', 'target'),
|
||||
'audio' => array('src', 'controls', 'autoplay', 'loop', 'muted', 'preload'),
|
||||
'video' => array('autoplay', 'controls', 'height', 'loop', 'muted', 'poster', 'preload', 'src', 'width'),
|
||||
'td' => array('colspan', 'rowspan'),
|
||||
'th' => array('colspan', 'rowspan'),
|
||||
'col' => array('span'),
|
||||
'embed' => array('src', 'wmode', 'type', 'width', 'height'),
|
||||
'x-bbcode' => array('alt'),
|
||||
'label' => array('for'),
|
||||
'source' => array('media', 'sizes', 'src', 'srcset', 'type'),
|
||||
|
||||
);
|
||||
|
||||
$this->scriptAttributes = array('onclick', 'onchange', 'onblur', 'onload', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup',
|
||||
'ondblclick', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel',
|
||||
'onwheel', 'oncopy', 'oncut', 'onpaste'
|
||||
);
|
||||
|
||||
$this->blockTags = array('p', 'pre', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote'); // element includes its own line-break.
|
||||
|
||||
$this->badAttrValues = array('javascript[\s]*?:', 'alert\(', 'vbscript[\s]*?:', 'data:text\/html', 'mhtml[\s]*?:', 'data:[\s]*?image');
|
||||
|
||||
$this->replaceAttrValues = array(
|
||||
'default' => array()
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -16,7 +16,7 @@
|
||||
<word>clean</word>
|
||||
</keywords>
|
||||
<screenshots>
|
||||
<image>preview_frontend.webp</image>
|
||||
<image>preview_frontend.png</image>
|
||||
</screenshots>
|
||||
<libraries>
|
||||
<library name="bootstrap" version="3" scope="all"/>
|
||||
|
25
install.php
25
install.php
@@ -56,7 +56,7 @@ class installLog
|
||||
static function errorHandler($errno=null, $errstr=null, $errfile=null, $errline=null)
|
||||
{
|
||||
|
||||
$error = "Error on line $errline in file ".$errfile." : ".$errstr;
|
||||
$error = "Error on line ".$errline." in file ".$errfile." : ".$errstr;
|
||||
|
||||
switch($errno)
|
||||
{
|
||||
@@ -84,10 +84,15 @@ class installLog
|
||||
self::add($error, "debug");
|
||||
break;
|
||||
default:
|
||||
self::add($error, "warn");
|
||||
if(!empty($errno))
|
||||
{
|
||||
self::add($error, "warn");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -133,6 +138,8 @@ set_exception_handler(array('installLog','exceptionHandler'));
|
||||
set_error_handler(array('installLog',"errorHandler"));
|
||||
register_shutdown_function(array('installLog',"errorHandler"));
|
||||
|
||||
|
||||
|
||||
/*define("e_UC_PUBLIC", 0);
|
||||
define("e_UC_MAINADMIN", 250);
|
||||
define("e_UC_READONLY", 251);
|
||||
@@ -527,10 +534,8 @@ class e_install
|
||||
$this->stage = 1;
|
||||
installLog::clear();
|
||||
installLog::add('Stage 1 started');
|
||||
// installLog::add('Stage 1 started');
|
||||
|
||||
|
||||
|
||||
$this->template->SetTag("installation_heading", LANINS_001);
|
||||
$this->template->SetTag("stage_pre", LANINS_002);
|
||||
$this->template->SetTag("stage_num", LANINS_003);
|
||||
@@ -1313,6 +1318,7 @@ class e_install
|
||||
$themeInfo = $this->get_theme_xml($val);
|
||||
|
||||
|
||||
|
||||
$opts[$val] = array(
|
||||
'title' =>vartrue($themeInfo['@attributes']['name']),
|
||||
'category' => vartrue($themeInfo['category']),
|
||||
@@ -1320,6 +1326,7 @@ class e_install
|
||||
'description' => vartrue($themeInfo['info'])
|
||||
);
|
||||
|
||||
|
||||
/* $title = vartrue($themeInfo['@attributes']['name']);
|
||||
$category = vartrue($themeInfo['category']);
|
||||
$preview = e_THEME.$val."/".$themeInfo['thumbnail'];
|
||||
@@ -2168,16 +2175,6 @@ if($this->pdo == true)
|
||||
if (!$this->dbqry($sql_table))
|
||||
{
|
||||
installLog::add("Query Failed in ".$filename." : ".$sql_table, 'error');
|
||||
/* if($this->debug)
|
||||
{
|
||||
echo "<h3>filename</h3>";
|
||||
var_dump($filename);
|
||||
|
||||
echo "<h3>sql_table</h3>";
|
||||
var_dump($sql_table);
|
||||
echo "<h3>result[0]</h3>";
|
||||
var_dump($result[0]);
|
||||
}*/
|
||||
return nl2br(LANINS_061."\n\n<b>".LANINS_083."\n</b><i>".e107::getDb()->getLastErrorText()."</i>");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user