From 04b158c5441417475002b0088a12f7f60806a196 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 24 Dec 2025 21:45:02 +0900 Subject: [PATCH 1/7] Fix fatal error if CAPTCHA is configured but disabled --- modules/spamfilter/spamfilter.controller.php | 6 +++++- modules/spamfilter/spamfilter.model.php | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/spamfilter/spamfilter.controller.php b/modules/spamfilter/spamfilter.controller.php index ceea7c0f0..d85fd8bfc 100644 --- a/modules/spamfilter/spamfilter.controller.php +++ b/modules/spamfilter/spamfilter.controller.php @@ -337,8 +337,12 @@ class SpamfilterController extends Spamfilter if (count($target_actions)) { $captcha_class = 'Rhymix\\Modules\\Spamfilter\\Captcha\\' . $config->captcha->type; - $captcha_class::init($config->captcha); + if (!class_exists($captcha_class)) + { + return; + } + $captcha_class::init($config->captcha); if (strncasecmp('proc', $obj->act, 4) === 0) { $captcha_class::check(); diff --git a/modules/spamfilter/spamfilter.model.php b/modules/spamfilter/spamfilter.model.php index c7f73f217..379cf776c 100644 --- a/modules/spamfilter/spamfilter.model.php +++ b/modules/spamfilter/spamfilter.model.php @@ -218,7 +218,7 @@ class SpamfilterModel extends Spamfilter { $config = ModuleModel::getModuleConfig('spamfilter'); $user = Context::get('logged_info'); - if (!isset($config) || empty($config->captcha) || empty($config->captcha->type) || empty($config->captcha->site_key) || empty($config->captcha->secret_key)) + if (!isset($config) || empty($config->captcha) || empty($config->captcha->type) || $config->captcha->type === 'none' || empty($config->captcha->site_key) || empty($config->captcha->secret_key)) { return false; } @@ -253,7 +253,7 @@ class SpamfilterModel extends Spamfilter public static function getCaptcha($target_action = null) { $config = ModuleModel::getModuleConfig('spamfilter'); - if (!isset($config) || empty($config->captcha) || empty($config->captcha->type) || empty($config->captcha->site_key) || empty($config->captcha->secret_key)) + if (!isset($config) || empty($config->captcha) || empty($config->captcha->type) || $config->captcha->type === 'none' || empty($config->captcha->site_key) || empty($config->captcha->secret_key)) { return null; } @@ -285,7 +285,7 @@ class SpamfilterModel extends Spamfilter public static function checkCaptchaResponse(?string $response = null): void { $config = ModuleModel::getModuleConfig('spamfilter'); - if (!isset($config) || empty($config->captcha) || empty($config->captcha->type) || empty($config->captcha->site_key) || empty($config->captcha->secret_key)) + if (!isset($config) || empty($config->captcha) || empty($config->captcha->type) || $config->captcha->type === 'none' || empty($config->captcha->site_key) || empty($config->captcha->secret_key)) { throw new Exception('msg_recaptcha_not_configured'); } From 94a5b404352022bc4fe3b549eb3c603b6b3332ec Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 1 Jan 2026 18:30:19 +0900 Subject: [PATCH 2/7] Fix missing check for required extra variable #2641 --- modules/document/document.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index c8e54b5ec..dc3e0506b 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -889,7 +889,7 @@ class DocumentController extends Document if (!$manual_inserted) { $ev_output = $extra_item->validate($value); - if ($ev_output && !$output->toBool()) + if ($ev_output && !$ev_output->toBool()) { $oDB->rollback(); return $ev_output; From d6b7cb52b88301c4298bcbf4bce8cb5c70951273 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 1 Jan 2026 18:39:20 +0900 Subject: [PATCH 3/7] Fix deprecations in PHP 8.5 #2639 --- addons/adminlogging/adminlogging.addon.php | 4 ++-- classes/object/Object.class.php | 2 +- common/framework/DB.php | 11 ++++++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/addons/adminlogging/adminlogging.addon.php b/addons/adminlogging/adminlogging.addon.php index 42f5bd581..97750ca50 100644 --- a/addons/adminlogging/adminlogging.addon.php +++ b/addons/adminlogging/adminlogging.addon.php @@ -10,9 +10,9 @@ if(!defined('__XE__')) * @brief admin log */ $logged_info = Context::get('logged_info'); -if(Context::get('is_logged') && $logged_info->is_admin == 'Y' && stripos(Context::get('act'), 'admin') !== false && $called_position == 'before_module_proc') +if ($called_position === 'before_module_proc' && $logged_info->is_admin === 'Y' && stripos(Context::get('act') ?? '', 'admin') !== false) { - $oAdminloggingController = getController('adminlogging'); + $oAdminloggingController = adminloggingController::getInstance(); $oAdminloggingController->insertLog($this->module, $this->act); } /* End of file adminlogging.php */ diff --git a/classes/object/Object.class.php b/classes/object/Object.class.php index 6c574b4be..abc5e2b87 100644 --- a/classes/object/Object.class.php +++ b/classes/object/Object.class.php @@ -185,7 +185,7 @@ class BaseObject { $type = $this->get('message_type'); $typeList = array('error' => 1, 'info' => 1, 'update' => 1); - if(!isset($typeList[$type])) + if (!isset($type) || !isset($typeList[$type])) { $type = $this->getError() ? 'error' : 'info'; } diff --git a/common/framework/DB.php b/common/framework/DB.php index 31fb26104..084299617 100644 --- a/common/framework/DB.php +++ b/common/framework/DB.php @@ -127,9 +127,18 @@ class DB \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, \PDO::ATTR_EMULATE_PREPARES => false, \PDO::ATTR_STATEMENT_CLASS => array('\Rhymix\Framework\Helpers\DBStmtHelper'), - \PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => false, ); + // Use unbuffered queries to reduce memory usage. + if (\PHP_VERSION_ID >= 80400) + { + $options[\PDO\MySQL::ATTR_USE_BUFFERED_QUERY] = false; + } + else + { + $options[\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY] = false; + } + // Preload the statement helper class. class_exists('\Rhymix\Framework\Helpers\DBStmtHelper'); From 333f214b8cec2cf44c5927a70abac21cd44d7697 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 1 Jan 2026 19:43:06 +0900 Subject: [PATCH 4/7] Display search result count in admin list #2642 --- modules/comment/tpl/comment_list.html | 2 ++ modules/document/tpl/document_list.html | 2 ++ modules/file/file.admin.view.php | 2 ++ modules/file/tpl/file_list.html | 4 +++- modules/member/lang/en.php | 3 ++- modules/member/lang/ko.php | 1 + modules/member/tpl/member_list.html | 2 +- 7 files changed, 13 insertions(+), 3 deletions(-) diff --git a/modules/comment/tpl/comment_list.html b/modules/comment/tpl/comment_list.html index 71d9b2c87..4ae81ff36 100644 --- a/modules/comment/tpl/comment_list.html +++ b/modules/comment/tpl/comment_list.html @@ -9,6 +9,8 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
+ {$lang->cmd_search}({number_format($total_count)}) + | {$lang->all}({number_format($total_count)}) | {$secret_name_list['N']}({number_format($total_count)}) diff --git a/modules/document/tpl/document_list.html b/modules/document/tpl/document_list.html index d93c38115..51833e29d 100644 --- a/modules/document/tpl/document_list.html +++ b/modules/document/tpl/document_list.html @@ -11,6 +11,8 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
+ {$lang->cmd_search}({number_format($total_count)}) + | {$lang->all}({number_format($total_count)}) | {$status_name_list['PUBLIC']}({number_format($total_count)}) diff --git a/modules/file/file.admin.view.php b/modules/file/file.admin.view.php index abd23c5b1..d19fc4e8f 100644 --- a/modules/file/file.admin.view.php +++ b/modules/file/file.admin.view.php @@ -189,6 +189,8 @@ class FileAdminView extends File Context::set('total_page', $output->total_page); Context::set('page', $output->page); Context::set('page_navigation', $output->page_navigation); + Context::set('isvalid', $args->isvalid); + // Set a template $security = new Security(); $security->encodeHTML('file_list..'); diff --git a/modules/file/tpl/file_list.html b/modules/file/tpl/file_list.html index ba4ec7439..eb51ee2bd 100644 --- a/modules/file/tpl/file_list.html +++ b/modules/file/tpl/file_list.html @@ -12,7 +12,9 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
- {$lang->all}({number_format($total_count)}) + {$lang->cmd_search}({number_format($total_count)}) + | + {$lang->all}({number_format($total_count)}) | {$lang->is_valid}({number_format($total_count)}) | diff --git a/modules/member/lang/en.php b/modules/member/lang/en.php index 874008eb8..5f701c334 100644 --- a/modules/member/lang/en.php +++ b/modules/member/lang/en.php @@ -341,7 +341,8 @@ $lang->set_manage_id = 'Separated by line breaks.'; $lang->count_manage_id = 'There are %s prohibited ID.'; $lang->count_manage_nick_name = 'There are %s prohibited nick name.'; $lang->user_list = 'Member List'; -$lang->cmd_show_all_member = 'All Member'; +$lang->cmd_show_all_member = 'All Members'; +$lang->cmd_show_searched_member = 'Searched Members'; $lang->cmd_show_super_admin_member = 'Super Admin'; $lang->cmd_show_site_admin_member = 'Site Admin'; $lang->approval = 'Approval'; diff --git a/modules/member/lang/ko.php b/modules/member/lang/ko.php index fd29a4d81..ca5014207 100644 --- a/modules/member/lang/ko.php +++ b/modules/member/lang/ko.php @@ -346,6 +346,7 @@ $lang->count_manage_id = '%s개의 금지 $lang->count_manage_nick_name = '%s개의 금지 닉네임이 있습니다.'; $lang->user_list = '회원 목록'; $lang->cmd_show_all_member = '모든 회원'; +$lang->cmd_show_searched_member = '검색된 회원'; $lang->cmd_show_super_admin_member = '최고 관리자'; $lang->cmd_show_site_admin_member = '사이트 관리자'; $lang->approval = '승인'; diff --git a/modules/member/tpl/member_list.html b/modules/member/tpl/member_list.html index dfd63161a..09ce416ad 100644 --- a/modules/member/tpl/member_list.html +++ b/modules/member/tpl/member_list.html @@ -14,7 +14,7 @@
- {$lang->cmd_show_all_member}({$total_count}) + {empty($search_keyword) ? $lang->cmd_show_all_member : $lang->cmd_show_searched_member}({$total_count}) | {$lang->cmd_show_super_admin_member}({$total_count}) | From 8b1da6a98a43981791eed3a1ff37cbf7baa959c3 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Tue, 6 Jan 2026 21:36:10 +0900 Subject: [PATCH 5/7] Fix incorrect handling of nested context switches (CSS inside HTML inside JS) in template v2 #2646 --- .../parsers/template/TemplateParser_v2.php | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/common/framework/parsers/template/TemplateParser_v2.php b/common/framework/parsers/template/TemplateParser_v2.php index f85f30ccc..d71af7947 100644 --- a/common/framework/parsers/template/TemplateParser_v2.php +++ b/common/framework/parsers/template/TemplateParser_v2.php @@ -179,14 +179,18 @@ class TemplateParser_v2 */ protected function _addContextSwitches(string $content): string { + $context_index = random_int(12000, 99000); + // Inline styles. $content = preg_replace_callback('#(?<=\s)(style=")([^"]*?)"#i', function($match) { return $match[1] . 'config->context = \'CSS\'; ?>' . $match[2] . 'config->context = \'HTML\'; ?>"'; }, $content); // Inline scripts. - $content = preg_replace_callback('#(?<=\s)(href="javascript:|pattern="|on[a-z]+=")([^"]*?)"#i', function($match) { - return $match[1] . 'config->context = \'JS\'; ?>' . $match[2] . 'config->context = \'HTML\'; ?>"'; + $content = preg_replace_callback('#(?<=\s)(href="javascript:|pattern="|on[a-z]+=")([^"]*?)"#i', function($match) use(&$context_index) { + $context_index++; + return $match[1] . 'config->context = \'JS\'; /* !CTX' . $context_index . '! */?>' . + $match[2] . 'config->context = \'HTML\'; /* !CTX' . $context_index . '! */?>"'; }, $content); //