4.47 release

pull/514/head 4.47
warlee 2021-12-31 21:14:15 +08:00
parent baf467eac8
commit 0e0bcf9bde
33 changed files with 67 additions and 63 deletions

File diff suppressed because one or more lines are too long

View File

@ -27,6 +27,16 @@ function checkExt($file){
}
return 1;
}
function checkExtSafe($file){
if($file == '.htaccess' || $file == '.user.ini') return false;
if (strstr($file,'<') || strstr($file,'>') || $file=='') return false;
$disable = 'php|phtml|phtm|pwml|asp|aspx|ascx|jsp|pl|html|htm|svg|shtml|shtm';
$extArr = explode('|',$disable);
foreach ($extArr as $ext) {
if ($ext && stristr($file,'.'.$ext)) return false;
}
return true;
}
//-----解压缩跨平台编码转换;自动识别编码-----
//压缩前,文件名处理;

View File

@ -100,11 +100,6 @@ class Downloader {
//下载完成,重命名临时文件到目标文件
fclose($downloadFp);
fclose($fp);
$filesize = get_filesize(iconv_system($fileTemp));
if($headerSize != 0 && $filesize != $headerSize){
return array('code'=>false,'data'=>'file size error');
}
self::checkGzip($fileTemp);
if(!@rename($fileTemp,$fileName)){
usleep(round(rand(0,1000)*50));//0.01~10ms
@ -145,11 +140,6 @@ class Downloader {
if($filesize < $length && $length!=0){
return array('code'=>false,'data'=>'downloading');
}
if($filesize > $length && $length!=0){
//远程下载大小不匹配;则返回正在下载中,客户端重新触发下载
return array('code'=>false,'data'=>'file size error');
}
if($res && filesize($fileTemp) != 0){
self::checkGzip($fileTemp);
if(!@rename($fileTemp,$fileName)){

View File

@ -79,7 +79,7 @@ class PluginBase{
show_json(LNG('url error!'),false);
}
$cacheName = md5($path.'kodcloud').'.'.get_path_ext($path);
$cacheFile = TEMP_PATH.$this->pluginName.'/files/'.$cacheName;
$cacheFile = $this->filePathName($cacheName);
mk_dir(get_path_father($cacheFile));
if(!file_exists($cacheFile)){
$result = url_request($path,'DOWNLOAD',$cacheFile);
@ -92,8 +92,8 @@ class PluginBase{
version_compare(phpversion(), '7.1.0', '>=') &&
preg_match("/([\x81-\xfe][\x40-\xfe])/", $path, $match)){
$name = hash_path($path).'.'.get_path_ext($path);
$cacheFile = TEMP_PATH.$this->pluginName.'/files/'.$name;
$cacheName = hash_path($path).'.'.get_path_ext($path);
$cacheFile = $this->filePathName($cacheName);
mk_dir(get_path_father($cacheFile));
if(!file_exists($cacheFile)){
@copy($path,$cacheFile);
@ -106,6 +106,10 @@ class PluginBase{
}
return $path;
}
private function filePathName($fileName){
if(! checkExtSafe($fileName)){$fileName = $fileName.'.txt';}
return TEMP_PATH.$this->pluginName.'/files/'.$fileName;
}
/**
* 插件配置数据加载

View File

@ -1,3 +1,3 @@
<?php
define('KOD_VERSION','4.46');
define('KOD_VERSION_BUILD','0714');//time(),0409
define('KOD_VERSION','4.47');
define('KOD_VERSION_BUILD','1228');//time(),0409

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/* power by kodexplorer ver 4.46(2021-07-14) [build 1626241877.8383] */
/* power by kodexplorer ver 4.47(2021-12-31) [build 1640956260.8295] */
@import url('./fileIcon.css');
@import url('./common.css');
.frame-main{position:absolute;top:40px;width:100%;bottom:0px;}.frame-main .tools-left{background:#f8f8f8 url("../../../images/common/bg.gif") 0 0px;position:fixed;line-height:30px;padding-left:20px;height:28px;border-bottom:1px solid #ddd;left:0;width:100%;}.frame-main .tools-left a{font-size:1.25em;font-weight:800;text-decoration:none;color:#999;text-shadow:0 0 3px;display:inline-block;padding:2px 6px;margin-top:0;height:20px;line-height:20px;}.frame-main .tools-left a:hover{background:url("../../../images/common/buttons_40.png") 0 0px repeat-x;-webkit-box-shadow:0 2px 8px rgba(0,0,0,0.8);-moz-box-shadow:0 2px 8px rgba(0,0,0,0.8);box-shadow:0 2px 8px rgba(0,0,0,0.8);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.frame-main .frame-left{position:absolute;left:0;top:30px;bottom:0;width:200px;background:#fff;background-attachment:fixed;overflow:auto;}.frame-main .frame-left .ztree{margin-top:0;}.frame-main .frame-left .ztree li.level0{margin-bottom:5px;}.frame-main .frame-resize{width:10px;cursor:col-resize;z-index:100;position:absolute;left:195px;top:0;bottom:0;overflow:hidden;background:url("../../../images/common/resize.png") 0px 50% no-repeat;}.frame-main .frame-resize.active{background:#000;opacity:0.2;filter:alpha(opacity=20);}.frame-main .frame-right{left:200px;right:0;position:absolute;top:0;bottom:0;overflow:auto;}.frame-main .frame-right .frame-right-main .resize-mask{z-index:999;position:absolute;left:0;top:0;bottom:0;right:0;display:none;}.frame-main .frame-right .frame-right-main .frame{height:100%;border-left:1px solid #ddd;overflow:hidden;}
/* ver 4.46(2021-07-14) [build 1626241877.8383] */
/* ver 4.47(2021-12-31) [build 1640956260.8295] */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long