Skip to content

Commit

Permalink
4.47 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kalcaddle committed Dec 31, 2021
1 parent baf467e commit 0e0bcf9
Show file tree
Hide file tree
Showing 33 changed files with 67 additions and 63 deletions.
2 changes: 1 addition & 1 deletion app/controller/utils.php

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions app/function/helper.function.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

//-----解压缩跨平台编码转换;自动识别编码-----
//压缩前,文件名处理;
Expand Down
10 changes: 0 additions & 10 deletions app/kod/Downloader.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ static function fileDownloadFopen($url, $fileName,$headerSize=0){
//下载完成,重命名临时文件到目标文件
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
Expand Down Expand Up @@ -145,11 +140,6 @@ static function fileDownloadCurl($url, $fileName,$supportRange=false,$existsLeng
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)){
Expand Down
10 changes: 7 additions & 3 deletions app/kod/PluginBase.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ final function filePath($path){
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);
Expand All @@ -92,8 +92,8 @@ final function filePath($path){
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);
Expand All @@ -106,6 +106,10 @@ final function filePath($path){
}
return $path;
}
private function filePathName($fileName){
if(! checkExtSafe($fileName)){$fileName = $fileName.'.txt';}
return TEMP_PATH.$this->pluginName.'/files/'.$fileName;
}

/**
* 插件配置数据加载
Expand Down
4 changes: 2 additions & 2 deletions config/version.php
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion plugins/toolsCommon/static/pie/.pie.tif

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/app/src/api/default/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/app/src/api/view/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/app/src/app/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/app/src/desktop/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/app/src/edit/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/app/src/editor/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/app/src/explorer/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/app/src/explorerWap/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/app/src/plugins/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/app/src/setting/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/app/src/shareEditor/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/app/src/shareExplorer/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/app/src/shareIndex/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/app/src/user/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/style/skin/base/app_code_edit.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/style/skin/base/app_desktop.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/style/skin/base/app_editor.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions static/style/skin/base/app_explorer.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/style/skin/base/app_setting.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/style/skin/mac.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/style/skin/metro.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0e0bcf9

Please sign in to comment.