diff --git a/.htaccess b/.htaccess index 89ecf951f..3007a3705 100644 --- a/.htaccess +++ b/.htaccess @@ -31,6 +31,7 @@ RewriteRule ^([0-9]+)$ ./index.php?document_srl=$1 [L,QSA] # mid link RewriteCond %{SCRIPT_FILENAME} !-d +RewriteRule ^admin/?$ ./index.php?module=admin [L,QSA] RewriteRule ^([a-zA-Z0-9_]+)/?$ ./index.php?mid=$1 [L,QSA] # mid + document link RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)$ ./index.php?mid=$1&document_srl=$2 [L,QSA] diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index 4674cc795..67d31c9bb 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -597,7 +597,7 @@ class DBMysql extends DB // MySQL only supports 767 bytes for indexed columns. // This is 191 characters in utf8mb4 and 255 characters in utf8. - if($column->attrs->utf8mb4 === 'false') + if($column->attrs->utf8mb4 === 'false' && stripos($type, 'char') !== false) { $column_charset = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci'; } diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 53b1aa756..dc2656151 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -63,6 +63,11 @@ class ModuleHandler extends Handler { $this->entry = Context::convertEncodingStr($entry); } + if(!$this->module && $this->mid === 'admin') + { + Context::set('module', $this->module = 'admin'); + Context::set('mid', $this->mid = null); + } // Validate variables to prevent XSS $isInvalid = NULL; @@ -402,7 +407,22 @@ class ModuleHandler extends Handler return $oMessageObject; } } - + + // check CSRF for POST actions + if(Context::getRequestMethod() === 'POST' && Context::isInstalled()) + { + if($xml_info->action->{$this->act} && $xml_info->action->{$this->act}->check_csrf !== 'false' && !checkCSRF()) + { + $this->_setInputErrorToContext(); + $this->error = 'msg_invalid_request'; + $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); + $oMessageObject->setError(-1); + $oMessageObject->setMessage($this->error); + $oMessageObject->dispMessage(); + return $oMessageObject; + } + } + if($this->module_info->use_mobile != "Y") { Mobile::setMobile(FALSE); @@ -410,16 +430,6 @@ class ModuleHandler extends Handler $logged_info = Context::get('logged_info'); - // check CSRF for POST actions - if(Context::getRequestMethod() === 'POST' && Context::isInstalled() && $this->act !== 'procFileUpload' && !checkCSRF()) { - $this->error = 'msg_invalid_request'; - $oMessageObject = self::getModuleInstance('message', $display_mode); - $oMessageObject->setError(-1); - $oMessageObject->setMessage($this->error); - $oMessageObject->dispMessage(); - return $oMessageObject; - } - // Admin ip if($kind == 'admin' && $_SESSION['denied_admin'] == 'Y') { @@ -552,7 +562,22 @@ class ModuleHandler extends Handler return $oMessageObject; } } - + + // check CSRF for POST actions + if(Context::getRequestMethod() === 'POST' && Context::isInstalled()) + { + if($xml_info->action->{$this->act} && $xml_info->action->{$this->act}->check_csrf !== 'false' && !checkCSRF()) + { + $this->_setInputErrorToContext(); + $this->error = 'msg_invalid_request'; + $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); + $oMessageObject->setError(-1); + $oMessageObject->setMessage($this->error); + $oMessageObject->dispMessage(); + return $oMessageObject; + } + } + if($type == "view" && Mobile::isFromMobilePhone()) { $orig_type = "view"; @@ -986,6 +1011,12 @@ class ModuleHandler extends Handler } $php_file = FileHandler::exists($menu->php_file); + if(!$php_file) + { + $oMenuAdminController = $oMenuAdminController ?: getAdminController('menu'); + $oMenuAdminController->makeXmlFile((isset($homeMenuSrl) && $homeMenuSrl) ? $homeMenuSrl : $menu->menu_srl); + $php_file = FileHandler::exists($menu->php_file); + } if($php_file) { include($php_file); diff --git a/common/lang/lang.xml b/common/lang/lang.xml index bc9e2e579..0afb91ef4 100644 --- a/common/lang/lang.xml +++ b/common/lang/lang.xml @@ -3975,8 +3975,8 @@ - - + + diff --git a/modules/file/conf/module.xml b/modules/file/conf/module.xml index 7f5425f6e..cb0aba1ae 100644 --- a/modules/file/conf/module.xml +++ b/modules/file/conf/module.xml @@ -8,7 +8,7 @@ - + diff --git a/modules/install/tpl/license_text.en.html b/modules/install/tpl/license_text.en.html index 0df775e37..aacb2e846 100644 --- a/modules/install/tpl/license_text.en.html +++ b/modules/install/tpl/license_text.en.html @@ -1,41 +1,27 @@ -

Copyright © RhymiX Developers and Contributors

-

Copyright © NAVER

+

+ Copyright © RhymiX Developers and Contributors
+ Copyright © NAVER +

- RhymiX is free software, developed as an open-source project. - For more information, please see the links below. + RhymiX is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free Software Foundation; + either version 2 of the License, or (at your option) any later version.

- RhymiX is a fork of the XpressEngine (XE) CMS - with additional patches by members of the XETOWN community. -

- - - -

- RhymiX and XE are free software; you can redistribute them and/or modify them - under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; - either version 2.1 of the License, or (at your option) any later version. -

- -

- This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public License along with this library; - if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + See the GNU General Public License for more details. + You should have received a copy of the GNU General Public License along with this program; + if not, write to the Free Software Foundation, Inc.

diff --git a/modules/install/tpl/license_text.ko.html b/modules/install/tpl/license_text.ko.html index 7581a561c..beae0c040 100644 --- a/modules/install/tpl/license_text.ko.html +++ b/modules/install/tpl/license_text.ko.html @@ -1,41 +1,28 @@ -

Copyright © RhymiX Developers and Contributors

-

Copyright © NAVER

+

+ Copyright © RhymiX Developers and Contributors
+ Copyright © NAVER +

- RhymiX는 자유 소프트웨어이며, 오픈소스 프로젝트로 개발되고 있습니다. - 자세한 내용은 아래 링크를 참조하시기 바랍니다. + RhymiX는 자유 소프트웨어입니다. + 소프트웨어의 피양도자는 자유 소프트웨어 재단이 공표한 GNU 일반 공중 사용 허가서 2판 + 또는 그 이후 판을 임의로 선택해서, 그 규정에 따라 프로그램을 개작하거나 재배포할 수 있습니다.

- RhymiX는 XpressEngine(XE)을 가지치기(fork)하여 XETOWN 커뮤니티 회원들이 개발한 다양한 기능을 추가한 것입니다. -

- - - -

- RhymiX와 XE는 자유 소프트웨어입니다. - 소프트웨어의 피양도자는 자유 소프트웨어 재단이 공표한 GNU 약소 일반 공중 사용 허가서 (LGPL) 2.1판 - 또는 그 이후 판을 임의로 선택해서, 그 규정에 따라 소프트웨어를 개작하거나 재배포할 수 있습니다. -

- -

- 이 소프트웨어는 유용하게 사용될 수 있으리라는 희망에서 배포되고 있지만, - 특정한 목적에 맞는 적합성 여부나 판매용으로 사용할 수 있으리라는 묵시적인 보증을 포함한 - 어떠한 형태의 보증도 제공하지 않습니다. - 보다 자세한 사항에 대해서는 GNU 약소 일반 공중 사용 허가서를 참고하시기 바랍니다. - GNU 약소 일반 공중 사용 허가서는 이 라이브러리와 함께 제공됩니다. + 이 프로그램은 유용하게 사용될 수 있으리라는 희망에서 배포되고 있지만, + 특정한 목적에 맞는 적합성 여부나 판매용으로 사용할 수 있으리라는 묵시적인 보증을 포함한 어떠한 형태의 보증도 제공하지 않습니다. + 보다 자세한 사항에 대해서는 GNU 일반 공중 사용 허가서를 참고하시기 바랍니다. + GNU 일반 공중 사용 허가서는 이 프로그램과 함께 제공됩니다. 만약, 이 문서가 누락되어 있다면 자유 소프트웨어 재단으로 문의하시기 바랍니다.

- + diff --git a/modules/module/module.model.php b/modules/module/module.model.php index 9f74c0397..b4ea17e03 100644 --- a/modules/module/module.model.php +++ b/modules/module/module.model.php @@ -934,6 +934,7 @@ class moduleModel extends module $standalone = $action->attrs->standalone=='false'?'false':'true'; $ruleset = $action->attrs->ruleset?$action->attrs->ruleset:''; $method = $action->attrs->method?$action->attrs->method:''; + $check_csrf = $action->attrs->check_csrf=='false'?'false':'true'; $index = $action->attrs->index; $admin_index = $action->attrs->admin_index; @@ -947,6 +948,7 @@ class moduleModel extends module $info->action->{$name}->standalone = $standalone; $info->action->{$name}->ruleset = $ruleset; $info->action->{$name}->method = $method; + $info->action->{$name}->check_csrf = $check_csrf; if($action->attrs->menu_name) { if($menu_index == 'true') @@ -970,6 +972,7 @@ class moduleModel extends module $buff[] = sprintf('$info->action->%s->standalone=\'%s\';', $name, $standalone); $buff[] = sprintf('$info->action->%s->ruleset=\'%s\';', $name, $ruleset); $buff[] = sprintf('$info->action->%s->method=\'%s\';', $name, $method); + $buff[] = sprintf('$info->action->%s->check_csrf=\'%s\';', $name, $check_csrf); if($index=='true') { diff --git a/modules/module/schemas/module_part_config.xml b/modules/module/schemas/module_part_config.xml index 98e1a94a0..bc28bb3ed 100644 --- a/modules/module/schemas/module_part_config.xml +++ b/modules/module/schemas/module_part_config.xml @@ -1,5 +1,5 @@ - +