diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 09f7d09a1..cd4265b1f 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -1658,6 +1658,7 @@ class Context 'document_srl.mid' => "$mid/$srl", 'document_srl.vid' => "$vid/$srl", 'document_srl.mid.vid' => "$vid/$mid/$srl", + 'act' => ($is_feed && $act !== 'api') ? $act : '', 'act.mid' => $is_feed ? "$mid/$act" : '', 'act.mid.vid' => $is_feed ? "$vid/$mid/$act" : '', 'act.document_srl.key' => ($act == 'trackback') ? "$srl/$key/$act" : '', diff --git a/config/config.inc.php b/config/config.inc.php index 95c9a96e7..3eb89230b 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -29,7 +29,7 @@ define('__ZBXE__', __XE__); /** * Display XE's full version. */ -define('__XE_VERSION__', '1.8.7'); +define('__XE_VERSION__', '1.8.8'); define('__XE_VERSION_ALPHA__', (stripos(__XE_VERSION__, 'alpha') !== false)); define('__XE_VERSION_BETA__', (stripos(__XE_VERSION__, 'beta') !== false)); define('__XE_VERSION_RC__', (stripos(__XE_VERSION__, 'rc') !== false)); diff --git a/modules/file/file.controller.php b/modules/file/file.controller.php index 8ded3a292..aa5c61e95 100644 --- a/modules/file/file.controller.php +++ b/modules/file/file.controller.php @@ -662,16 +662,17 @@ class fileController extends file } } + // https://github.com/xpressengine/xe-core/issues/1713 + $file_info['name'] = preg_replace('/\.(php|phtm|phar|html?|cgi|pl|exe|jsp|asp|inc)/i', '$0-x',$file_info['name']); + $file_info['name'] = removeHackTag($file_info['name']); + $file_info['name'] = str_replace(array('<','>'),array('%3C','%3E'),$file_info['name']); + // Get random number generator $random = new Password(); - + // Set upload path by checking if the attachement is an image or other kinds of file if(preg_match("/\.(jpe?g|gif|png|wm[va]|mpe?g|avi|swf|flv|mp[1-4]|as[fx]|wav|midi?|moo?v|qt|r[am]{1,2}|m4v)$/i", $file_info['name'])) { - // Immediately remove the direct file if it has any kind of extensions for hacking - $file_info['name'] = preg_replace('/\.(php|phtm|phar|html?|cgi|pl|exe|jsp|asp|inc)/i', '$0-x',$file_info['name']); - $file_info['name'] = str_replace(array('<','>'),array('%3C','%3E'),$file_info['name']); - $path = sprintf("./files/attach/images/%s/%s", $module_srl,getNumberingPath($upload_target_srl,3)); // special character to '_' diff --git a/modules/file/file.model.php b/modules/file/file.model.php index dcfddc907..83507bbc9 100644 --- a/modules/file/file.model.php +++ b/modules/file/file.model.php @@ -220,6 +220,7 @@ class fileModel extends file { $file = $file_list[$i]; $file->source_filename = stripslashes($file->source_filename); + $file->source_filename = htmlspecialchars($file->source_filename); $file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid, $file->module_srl); $file_list[$i] = $file; } diff --git a/modules/install/lang/lang.xml b/modules/install/lang/lang.xml index 26cb55e44..830611f17 100644 --- a/modules/install/lang/lang.xml +++ b/modules/install/lang/lang.xml @@ -5,7 +5,7 @@ - + @@ -34,36 +34,51 @@ + + + + + + + + + + + + + + + diff --git a/modules/rss/rss.admin.view.php b/modules/rss/rss.admin.view.php index 5dffb4888..9addb6b83 100644 --- a/modules/rss/rss.admin.view.php +++ b/modules/rss/rss.admin.view.php @@ -55,6 +55,7 @@ class rssAdminView extends rss } } if(!$total_config->feed_document_count) $total_config->feed_document_count = 15; + $total_config->url = $oRssModel->getModuleFeedUrl(NULL, '', 'rss', true); Context::set('feed_config', $feed_config); Context::set('total_config', $total_config); diff --git a/modules/rss/rss.model.php b/modules/rss/rss.model.php index d74f03bdc..472e0250e 100644 --- a/modules/rss/rss.model.php +++ b/modules/rss/rss.model.php @@ -12,27 +12,19 @@ class rssModel extends rss * * @param string $vid Vid * @param string $mid mid - * @param string $format Feed format. ef)xe, atom, rss1.0 + * @param string $format Feed format. rss | atom + * @param bool $absolute_url * @return string */ - function getModuleFeedUrl($vid = null, $mid, $format) + function getModuleFeedUrl($vid, $mid, $format = 'rss', $absolute_url = false) { - if(Context::isAllowRewrite()) + if($absolute_url) { - $request_uri = Context::getRequestUri(); - // If the virtual site variable exists and it is different from mid (vid and mid should not be the same) - if($vid && $vid != $mid) - { - return $request_uri.$vid.'/'.$mid.'/'.$format; - } - else - { - return $request_uri.$mid.'/'.$format; - } + return getFullUrl('','vid',$vid, 'mid',$mid, 'act',$format); } else { - return getUrl('','mid',$mid,'act',$format); + return getUrl('','vid',$vid, 'mid',$mid, 'act',$format); } } diff --git a/modules/rss/rss.view.php b/modules/rss/rss.view.php index 33577cf3a..86b99b5f5 100644 --- a/modules/rss/rss.view.php +++ b/modules/rss/rss.view.php @@ -172,7 +172,7 @@ class rssView extends rss $info->id = $proctcl.$_SERVER['HTTP_HOST'].$info->id; } - $info->language = Context::getLangType(); + $info->language = str_replace('jp','ja',Context::getLangType()); // Set the variables used in the RSS output Context::set('info', $info); Context::set('feed_config', $config); diff --git a/modules/rss/ruleset/insertRssConfig.xml b/modules/rss/ruleset/insertRssConfig.xml index 86304d836..9a8680fcf 100644 --- a/modules/rss/ruleset/insertRssConfig.xml +++ b/modules/rss/ruleset/insertRssConfig.xml @@ -1,13 +1,13 @@ - + - + - - + + - + 피드(Feed) 제목 Feed Title diff --git a/modules/rss/tpl/rss_admin_index.html b/modules/rss/tpl/rss_admin_index.html index aa0ae58d9..9055e894e 100644 --- a/modules/rss/tpl/rss_admin_index.html +++ b/modules/rss/tpl/rss_admin_index.html @@ -12,7 +12,7 @@