Skip to content

Commit

Permalink
4.49 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kalcaddle committed Aug 25, 2022
1 parent d555b05 commit 958e0f6
Show file tree
Hide file tree
Showing 24 changed files with 52 additions and 51 deletions.
1 change: 1 addition & 0 deletions app/controller/explorer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,7 @@ public function serverDownload() {
show_json(LNG('no_permission_write'),false);
}
$url = rawurldecode($this->in['url']);
if(!request_url_safe($url)){show_json('url error!',false);}
if(isset($this->in['name'])){
$filename = rawurldecode($this->in['name']);
}else{
Expand Down
2 changes: 1 addition & 1 deletion app/controller/utils.php

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions app/function/web.function.php
Original file line number Diff line number Diff line change
Expand Up @@ -540,16 +540,16 @@ function get_headers_curl($url,$timeout=30,$depth=0,&$headers=array()){

// 防止SSRF 攻击;curl,file_get_contents前检测url;
function request_url_safe($url){
$link = trim(strtolower($url));
$link = str_replace('\\','/',$link);
while (strstr($link,'../')) {
$link = str_replace('../', '/', $link);
}
if( substr($link,0,6) != "ftp://" &&
substr($link,0,7) != "http://" &&
substr($link,0,8) != "https://" ){
return false;
$url = str_replace('\\','/',$url);
$allow = array('http','https','ftp');
$info = parse_url($url);$hasAllow = false;
foreach($allow as $scheme){
$schemeNow = substr($url,0,strlen($scheme) + 3);
if($schemeNow === $scheme."://"){$hasAllow = true;}
}
if(!$hasAllow) return false;
if(!$info['scheme'] || !$info['host'] || !in_array($info['scheme'],$allow)) return false;
if(@file_exists($url) ) return false;
return true;
}

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.48');
define('KOD_VERSION_BUILD','02');//time(),20220516
define('KOD_VERSION','4.49');
define('KOD_VERSION_BUILD','01');//time(),20220825
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.

0 comments on commit 958e0f6

Please sign in to comment.