mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
Merge branch 'develop' into pr/misc-refactor
Conflicts: classes/module/ModuleHandler.class.php
This commit is contained in:
commit
8e5f0b53bd
9 changed files with 82 additions and 74 deletions
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -3975,8 +3975,8 @@
|
|||
<value xml:lang="en"><![CDATA[License Agreement]]></value>
|
||||
</item>
|
||||
<item name="license">
|
||||
<value xml:lang="ko"><![CDATA[LGPL v2.1]]></value>
|
||||
<value xml:lang="en"><![CDATA[LGPL v2.1]]></value>
|
||||
<value xml:lang="ko"><![CDATA[GPL v2]]></value>
|
||||
<value xml:lang="en"><![CDATA[GPL v2]]></value>
|
||||
</item>
|
||||
<item name="cmd_license_agree">
|
||||
<value xml:lang="ko"><![CDATA[사용권에 대해 이해했으며, 이에 동의합니다.]]></value>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<action name="dispFileAdminList" type="view" admin_index="true" menu_name="file" menu_index="true" />
|
||||
<action name="dispFileAdminConfig" type="view" menu_name="fileUpload" menu_index="true" />
|
||||
<action name="getFileList" type="model" />
|
||||
<action name="procFileUpload" type="controller" />
|
||||
<action name="procFileUpload" type="controller" check_csrf="false" />
|
||||
<action name="procFileIframeUpload" type="controller" />
|
||||
<action name="procFileImageResize" type="controller" ruleset="imageResize" />
|
||||
<action name="procFileDelete" type="controller" />
|
||||
|
|
|
|||
|
|
@ -1,41 +1,27 @@
|
|||
<p>Copyright © RhymiX Developers and Contributors</p>
|
||||
<p>Copyright © <a href="http://www.navercorp.com" target="_blank">NAVER</a></p>
|
||||
<p>
|
||||
Copyright © RhymiX Developers and Contributors<br />
|
||||
Copyright © <a href="http://www.navercorp.com" target="_blank">NAVER</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>RhymiX website: <a href="https://www.rhymix.org" target="_blank">https://www.rhymix.org</a></li>
|
||||
<li>RhymiX repository: <a href="https://github.com/rhymix/rhymix" target="_blank">https://github.com/rhymix/rhymix</a></li>
|
||||
<li>Official website: <a href="https://www.rhymix.org" target="_blank">https://www.rhymix.org</a></li>
|
||||
<li>Source code repository: <a href="https://github.com/rhymix/rhymix" target="_blank">https://github.com/rhymix/rhymix</a></li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
RhymiX is a fork of the XpressEngine (XE) CMS
|
||||
with additional patches by members of the XETOWN community.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>XE website: <a href="https://www.xpressengine.com" target="_blank">https://www.xpressengine.com</a></li>
|
||||
<li>XE repository: <a href="https://github.com/xpressengine/xe-core" target="_blank">https://github.com/xpressengine/xe-core</a></li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
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 <a href="https://fsf.org/" target="_blank">Free Software Foundation, Inc.</a>,
|
||||
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 <a href="https://fsf.org/" target="_blank">Free Software Foundation, Inc.</a>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>License : <a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" target="_blank">GNU Lesser General Public License, version 2.1</a></li>
|
||||
<li>License : <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html" target="_blank">GNU General Public License, version 2</a></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,41 +1,28 @@
|
|||
<p>Copyright © RhymiX Developers and Contributors</p>
|
||||
<p>Copyright © <a href="http://www.navercorp.com" target="_blank">NAVER</a></p>
|
||||
<p>
|
||||
Copyright © RhymiX Developers and Contributors<br />
|
||||
Copyright © <a href="http://www.navercorp.com" target="_blank">NAVER</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
RhymiX는 자유 소프트웨어이며, 오픈소스 프로젝트로 개발되고 있습니다.
|
||||
자세한 내용은 아래 링크를 참조하시기 바랍니다.
|
||||
RhymiX는 자유 소프트웨어입니다.
|
||||
소프트웨어의 피양도자는 자유 소프트웨어 재단이 공표한 GNU 일반 공중 사용 허가서 2판
|
||||
또는 그 이후 판을 임의로 선택해서, 그 규정에 따라 프로그램을 개작하거나 재배포할 수 있습니다.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>RhymiX 공식 사이트: <a href="https://www.rhymix.org" target="_blank">https://www.rhymix.org</a></li>
|
||||
<li>RhymiX 공식 저장소: <a href="https://github.com/rhymix/rhymix" target="_blank">https://github.com/rhymix/rhymix</a></li>
|
||||
<li>공식 사이트: <a href="https://www.rhymix.org" target="_blank">https://www.rhymix.org</a></li>
|
||||
<li>소스 코드 저장소: <a href="https://github.com/rhymix/rhymix" target="_blank">https://github.com/rhymix/rhymix</a></li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
RhymiX는 XpressEngine(XE)을 가지치기(fork)하여 XETOWN 커뮤니티 회원들이 개발한 다양한 기능을 추가한 것입니다.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>XE 공식 사이트: <a href="https://www.xpressengine.com" target="_blank">https://www.xpressengine.com</a></li>
|
||||
<li>XE 공식 저장소: <a href="https://github.com/xpressengine/xe-core" target="_blank">https://github.com/xpressengine/xe-core</a></li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
RhymiX와 XE는 자유 소프트웨어입니다.
|
||||
소프트웨어의 피양도자는 자유 소프트웨어 재단이 공표한 GNU 약소 일반 공중 사용 허가서 (LGPL) 2.1판
|
||||
또는 그 이후 판을 임의로 선택해서, 그 규정에 따라 소프트웨어를 개작하거나 재배포할 수 있습니다.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
이 소프트웨어는 유용하게 사용될 수 있으리라는 희망에서 배포되고 있지만,
|
||||
특정한 목적에 맞는 적합성 여부나 판매용으로 사용할 수 있으리라는 묵시적인 보증을 포함한
|
||||
어떠한 형태의 보증도 제공하지 않습니다.
|
||||
보다 자세한 사항에 대해서는 GNU 약소 일반 공중 사용 허가서를 참고하시기 바랍니다.
|
||||
GNU 약소 일반 공중 사용 허가서는 이 라이브러리와 함께 제공됩니다.
|
||||
이 프로그램은 유용하게 사용될 수 있으리라는 희망에서 배포되고 있지만,
|
||||
특정한 목적에 맞는 적합성 여부나 판매용으로 사용할 수 있으리라는 묵시적인 보증을 포함한 어떠한 형태의 보증도 제공하지 않습니다.
|
||||
보다 자세한 사항에 대해서는 GNU 일반 공중 사용 허가서를 참고하시기 바랍니다.
|
||||
GNU 일반 공중 사용 허가서는 이 프로그램과 함께 제공됩니다.
|
||||
만약, 이 문서가 누락되어 있다면 <a href="https://fsf.org/" target="_blank">자유 소프트웨어 재단</a>으로 문의하시기 바랍니다.
|
||||
</p>
|
||||
|
||||
|
||||
<ul>
|
||||
<li>한글 (비공식 번역본) : <a href="http://korea.gnu.org/people/chsong/copyleft/lgpl.ko.html" target="_blank">GNU Lesser General Public License, version 2.1</a></li>
|
||||
<li>영문 (공식 원본) : <a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" target="_blank">GNU Lesser General Public License, version 2.1</a></li>
|
||||
<li>한글 (비공식 번역본) : <a href="http://korea.gnu.org/documents/copyleft/gpl.ko.html" target="_blank">GNU General Public License, version 2</a></li>
|
||||
<li>영문 (공식 원본) : <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html" target="_blank">GNU General Public License, version 2</a></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<table name="module_part_config">
|
||||
<column name="module" type="varchar" size="250" notnull="notnull" />
|
||||
<column name="module" type="varchar" size="180" notnull="notnull" utf8mb4="false" />
|
||||
<column name="module_srl" type="number" size="11" notnull="notnull" />
|
||||
<column name="config" type="text" />
|
||||
<column name="regdate" type="date" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue