Skip to content

Commit 44a98c2

Browse files
author
bnu
committed
Merge branch 'release/1.11.1'
2 parents 50dc3a8 + ef53939 commit 44a98c2

File tree

10 files changed

+29
-9
lines changed

10 files changed

+29
-9
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ composer.lock
2323
*.sublime-project
2424
.codeintel
2525

26+
install.config.php

common/js/plugins/jquery.fileupload/js/jquery.fileupload.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1144,10 +1144,10 @@
11441144
$.map(entries, function (entry) {
11451145
return that._handleFileTreeEntry(entry, path);
11461146
})
1147-
).then(function (entries) {
1147+
).then(function () {
11481148
return Array.prototype.concat.apply(
11491149
[],
1150-
entries
1150+
arguments
11511151
);
11521152
});
11531153
},

common/tpl/common_layout.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<!--@if(stripos(Context::get('act'),'admin') || Context::get('module') == 'admin')-->
6868
{@$isAdminKind = true}
6969
<!--@end-->
70-
<body{Context::getBodyClass()}>
70+
<body{Context::getBodyClass()|noescape}>
7171
{Context::getBodyHeader()|noescape}
7272
{$content|noescape}
7373
{Context::getHtmlFooter()|noescape}

config/config.inc.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
/**
3030
* Display XE's full version.
3131
*/
32-
define('__XE_VERSION__', '1.11.0');
32+
define('__XE_VERSION__', '1.11.1');
3333
define('__XE_VERSION_ALPHA__', (stripos(__XE_VERSION__, 'alpha') !== false));
3434
define('__XE_VERSION_BETA__', (stripos(__XE_VERSION__, 'beta') !== false));
3535
define('__XE_VERSION_RC__', (stripos(__XE_VERSION__, 'rc') !== false));

config/func.inc.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -1780,6 +1780,12 @@ function reload($isOpener = FALSE)
17801780
</script>';
17811781
}
17821782

1783+
1784+
function isDefinedLangCode($str)
1785+
{
1786+
return preg_match('!\$user_lang->([a-z0-9\_]+)$!is', trim($str));
1787+
}
1788+
17831789
/**
17841790
* This function is a shortcut to htmlspecialchars().
17851791
*
@@ -1790,8 +1796,10 @@ function reload($isOpener = FALSE)
17901796
* @param bool $double_escape Set this to false to skip symbols that are already escaped (default: true)
17911797
* @return string
17921798
*/
1793-
function escape($str, $double_escape = true)
1799+
function escape($str, $double_escape = true, $escape_defined_lang_code = false)
17941800
{
1801+
if(!$escape_defined_lang_code && isDefinedLangCode($str)) return $str;
1802+
17951803
$flags = ENT_QUOTES | ENT_SUBSTITUTE;
17961804
return htmlspecialchars($str, $flags, 'UTF-8', $double_escape);
17971805
}

modules/document/document.admin.controller.php

+12
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ function moveDocumentModule($document_srl_list, $module_srl, $category_srl)
108108
$file_info['tmp_name'] = $val->uploaded_filename;
109109
$file_info['name'] = $val->source_filename;
110110
$inserted_file = $oFileController->insertFile($file_info, $module_srl, $obj->document_srl, $val->download_count, true);
111+
112+
if(!$inserted_file->toBool()) {
113+
$oDB->rollback();
114+
return $inserted_file;
115+
}
116+
111117
if($inserted_file && $inserted_file->toBool())
112118
{
113119
// for image/video files
@@ -301,6 +307,12 @@ function copyDocumentModule($document_srl_list, $module_srl, $category_srl)
301307
$file_info['name'] = $val->source_filename;
302308
$oFileController = getController('file');
303309
$inserted_file = $oFileController->insertFile($file_info, $module_srl, $obj->document_srl, 0, true);
310+
311+
if(!$inserted_file->toBool()) {
312+
$oDB->rollback();
313+
return $inserted_file;
314+
}
315+
304316
// if image/video files
305317
if($val->direct_download == 'Y')
306318
{

modules/file/file.controller.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ function insertFile($file_info, $module_srl, $upload_target_srl, $download_count
746746
if(!FileHandler::makeDir($path)) return new BaseObject(-1,'msg_not_permitted_create');
747747

748748
// Check uploaded file
749-
if(!checkUploadedFile($file_info['tmp_name'])) return new BaseObject(-1,'msg_file_upload_error');
749+
if(!$manual_insert && !checkUploadedFile($file_info['tmp_name'])) return new BaseObject(-1,'msg_file_upload_error');
750750

751751
// Get random number generator
752752
$random = new Password();

modules/module/module.model.php

-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ function getModuleInfoByModuleSrl($module_srl, $columnList = array())
403403
else $module_info = $mid_info;
404404

405405
$oModuleController = getController('module');
406-
if(isset($module_info->browser_title)) $oModuleController->replaceDefinedLangCode($module_info->browser_title);
407406

408407
$this->applyDefaultSkin($module_info);
409408
return $this->addModuleExtraVars($module_info);

modules/module/tpl/module_selector.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ <h2 cond="$key" style="margin-top:40px;">{$key}</h2>
4343
{@ $_idx =0; }
4444
<!--@foreach($val as $k => $v)-->
4545
<!--@if($_idx >0)--><tr><!--@end-->
46-
{@ $browser_title = str_replace("'", "\\'", htmlspecialchars($v->browser_title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)); }
46+
{@ $browser_title = str_replace("'", "\\'", escape($v->browser_title, false)); }
4747
<td>{$k}</td>
4848
<td>{$v->browser_title}</td>
4949
<td><a href="#" onclick="insertModule('{$id}', {$v->module_srl}, '{$k}', '{$browser_title}',{$type=='single'?'false':'true'}); return false;" class="button green"><span>{$type=='single'?$lang->cmd_select:$lang->cmd_insert}</span></a></td>

modules/seo/seo.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ protected function applySEO()
123123
$na_script = <<< NASCRIPT
124124
<!-- NAVER Analytics -->
125125
<script src="//wcs.naver.net/wcslog.js"></script>
126-
<script>if(!wcs_add){var wcs_add={wa:'{$config->na_id}'};}if(typeof wcs_do!="undefined"){wcs_do();}</script>
126+
<script>if(!wcs_add){var wcs_add={};};wcs_add['wa']='{$config->na_id}';if(typeof wcs_do!="undefined"){wcs_do();}</script>
127127
NASCRIPT;
128128
Context::addHtmlFooter($na_script . PHP_EOL);
129129
}

0 commit comments

Comments
 (0)