diff --git a/.travis.yml b/.travis.yml index 03e76fdb9..72a55f5ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ matrix: allow_failures: - php: 7 - php: hhvm +sudo: false before_script: - travis_retry composer self-update - npm install -g grunt-cli 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 @@
diff --git a/tests/Install/InstallTester.php b/tests/Install/InstallTester.php index 1e1aef6fa..c40651039 100644 --- a/tests/Install/InstallTester.php +++ b/tests/Install/InstallTester.php @@ -1,4 +1,4 @@ -scenario->runStep(new \Codeception\Step\Action('grabCookie', func_get_args())); } @@ -1662,7 +1662,7 @@ class InstallTester extends \Codeception\Actor * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Lib\InnerBrowser::seeCookie() */ - public function canSeeCookie($name, $params = null) { + public function canSeeCookie($cookie, $params = null) { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args())); } /** @@ -1682,7 +1682,7 @@ class InstallTester extends \Codeception\Actor * @return mixed * @see \Codeception\Lib\InnerBrowser::seeCookie() */ - public function seeCookie($name, $params = null) { + public function seeCookie($cookie, $params = null) { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args())); } @@ -1700,7 +1700,7 @@ class InstallTester extends \Codeception\Actor * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() */ - public function cantSeeCookie($name, $params = null) { + public function cantSeeCookie($cookie, $params = null) { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args())); } /** @@ -1715,7 +1715,7 @@ class InstallTester extends \Codeception\Actor * @return mixed * @see \Codeception\Lib\InnerBrowser::dontSeeCookie() */ - public function dontSeeCookie($name, $params = null) { + public function dontSeeCookie($cookie, $params = null) { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args())); } @@ -1900,7 +1900,7 @@ class InstallTester extends \Codeception\Actor * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() */ - public function canSeeOptionIsSelected($select, $optionText) { + public function canSeeOptionIsSelected($selector, $optionText) { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args())); } /** @@ -1920,7 +1920,7 @@ class InstallTester extends \Codeception\Actor * @return mixed * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected() */ - public function seeOptionIsSelected($select, $optionText) { + public function seeOptionIsSelected($selector, $optionText) { return $this->scenario->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args())); } @@ -1943,7 +1943,7 @@ class InstallTester extends \Codeception\Actor * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() */ - public function cantSeeOptionIsSelected($select, $optionText) { + public function cantSeeOptionIsSelected($selector, $optionText) { return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args())); } /** @@ -1963,7 +1963,7 @@ class InstallTester extends \Codeception\Actor * @return mixed * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected() */ - public function dontSeeOptionIsSelected($select, $optionText) { + public function dontSeeOptionIsSelected($selector, $optionText) { return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args())); } diff --git a/tests/unit/UnitTester.php b/tests/unit/UnitTester.php index 3618c9542..65d410d75 100644 --- a/tests/unit/UnitTester.php +++ b/tests/unit/UnitTester.php @@ -1,4 +1,4 @@ -