From c1942080e79a61c66710f1eaadd191ff89232eac Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 19 Jan 2026 19:44:25 +0900 Subject: [PATCH 1/9] Fix incorrect identification of DaumApps webview as robot --- common/framework/UA.php | 2 +- tests/unit/framework/UATest.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/framework/UA.php b/common/framework/UA.php index 14e14b87b..792845719 100644 --- a/common/framework/UA.php +++ b/common/framework/UA.php @@ -171,7 +171,7 @@ class UA } // Look for common search engine names and the 'bot' keyword. - if (preg_match('/bot|spider|crawler|archiver|wget|curl|php|slurp|wordpress|facebook|external(agent|fetcher)|teoma|yeti|daum|apachebench|googleother|mediapartners-google|[(<+]https?:|@/i', $ua)) + if (preg_match('/bot|spider|crawler|archiver|wget|curl|php|slurp|wordpress|facebook|external(agent|fetcher)|teoma|yeti|daum\b|apachebench|googleother|mediapartners-google|[(<+]https?:|@/i', $ua)) { return self::$_robot_cache[$ua] = true; } diff --git a/tests/unit/framework/UATest.php b/tests/unit/framework/UATest.php index a20ff65b0..ce4ba6921 100644 --- a/tests/unit/framework/UATest.php +++ b/tests/unit/framework/UATest.php @@ -40,6 +40,7 @@ class UATest extends \Codeception\Test\Unit $this->assertTrue(Rhymix\Framework\UA::isRobot('Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)')); $this->assertTrue(Rhymix\Framework\UA::isRobot('Googlebot/2.1 (+http://www.googlebot.com/bot.html)')); $this->assertTrue(Rhymix\Framework\UA::isRobot('Yeti/1.0 (NHN Corp.; http://help.naver.com/robots/)')); + $this->assertTrue(Rhymix\Framework\UA::isRobot('Mozilla/5.0 (compatible; MSIE or Firefox mutant; not on Windows server;) Daum 4.1')); $this->assertTrue(Rhymix\Framework\UA::isRobot('Random user agent (+https://url.com)')); $this->assertTrue(Rhymix\Framework\UA::isRobot('facebookexternalhit/1.1')); $this->assertTrue(Rhymix\Framework\UA::isRobot('meta-externalfetcher/1.1')); @@ -49,6 +50,7 @@ class UATest extends \Codeception\Test\Unit // Not robot $this->assertFalse(Rhymix\Framework\UA::isRobot('Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25')); $this->assertFalse(Rhymix\Framework\UA::isRobot('Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25')); + $this->assertFalse(Rhymix\Framework\UA::isRobot('Mozilla/5.0 (Linux; Android 15; SM-XXX Build/AAAA; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/143.0.0.0 Mobile Safari/537.36 DaumApps/8.0.0 DaumDevice/mobile')); $this->assertFalse(Rhymix\Framework\UA::isRobot('Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko')); } From 09919944a7c12708614c27c75f7b3d026469674d Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 28 Jan 2026 20:46:30 +0900 Subject: [PATCH 2/9] Prevent type error when non-integer input passed to getNumberingPath() --- common/legacy.php | 1 + 1 file changed, 1 insertion(+) diff --git a/common/legacy.php b/common/legacy.php index b6d962890..ba25076a4 100644 --- a/common/legacy.php +++ b/common/legacy.php @@ -875,6 +875,7 @@ function getDestroyXeVars($vars) */ function getNumberingPath($no, int $size = 3): string { + $no = intval($no); $mod = pow(10, $size); $output = sprintf('%0' . $size . 'd/', intval($no % $mod)); if($no >= $mod) From bb6eeb926ecc9ffa6eac48ef0de433fba3810255 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 28 Jan 2026 20:51:29 +0900 Subject: [PATCH 3/9] Add delay before closing window in doDocumentSelect() --- common/js/common.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/js/common.js b/common/js/common.js index 7504be4ad..2d8f3c34e 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -1604,7 +1604,11 @@ function doDocumentSelect(document_srl, module) { } else { opener.location.href = opener.current_url.setQuery('act', 'dispBoardWrite').setQuery('document_srl', document_srl); } - window.close(); + + // 딜레이 후 창 닫기 + setTimeout(function() { + window.close(); + }, 100); } /** From f051b58e09cbfbf2e44a8ec717445c8f42406a4f Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 28 Jan 2026 20:56:56 +0900 Subject: [PATCH 4/9] Preserve cover image information when copying document #2660 --- modules/file/file.controller.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/file/file.controller.php b/modules/file/file.controller.php index ba8876dbf..1e482ce9e 100644 --- a/modules/file/file.controller.php +++ b/modules/file/file.controller.php @@ -1865,7 +1865,14 @@ class FileController extends File foreach($source_file_list as $source_file) { - $this->copyFile($source_file, $module_srl, $upload_target_srl, $content); + $copied_file = $this->copyFile($source_file, $module_srl, $upload_target_srl, $content); + if ($source_file->cover_image == 'Y') + { + executeQuery('file.updateCoverImage', [ + 'file_srl' => $copied_file->get('file_srl'), + 'cover_image' => 'Y', + ]); + } } } From 70a25057f0b21dacf849430e65b2e61a35917198 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 28 Jan 2026 21:04:12 +0900 Subject: [PATCH 5/9] Fix incorrect redirect when loading saved document from another module #2659 --- common/js/common.js | 8 ++++++-- modules/document/tpl/saved_list_popup.html | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/common/js/common.js b/common/js/common.js index 2d8f3c34e..9103e5eed 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -1580,9 +1580,10 @@ function doDocumentLoad(obj) { * * @param int document_srl * @param string module + * @param string mid * @return void */ -function doDocumentSelect(document_srl, module) { +function doDocumentSelect(document_srl, module, mid) { if (!opener) { window.close(); return; @@ -1590,6 +1591,9 @@ function doDocumentSelect(document_srl, module) { if (module === undefined) { module = 'document'; } + if (mid === undefined) { + mid = current_mid; + } // 게시글을 가져와서 등록하기 if (module === 'page') { @@ -1602,7 +1606,7 @@ function doDocumentSelect(document_srl, module) { } opener.location.href = url; } else { - opener.location.href = opener.current_url.setQuery('act', 'dispBoardWrite').setQuery('document_srl', document_srl); + opener.location.href = opener.current_url.setQuery('mid', mid).setQuery('act', 'dispBoardWrite').setQuery('document_srl', document_srl); } // 딜레이 후 창 닫기 diff --git a/modules/document/tpl/saved_list_popup.html b/modules/document/tpl/saved_list_popup.html index 8ac7d1bd1..2d58c2756 100644 --- a/modules/document/tpl/saved_list_popup.html +++ b/modules/document/tpl/saved_list_popup.html @@ -11,6 +11,7 @@ {$lang->title} + {$lang->module} {$lang->date} {$lang->cmd_select} {$lang->cmd_delete} @@ -22,8 +23,9 @@ {$val->getTitle()} + {$val->getModuleName()} {$val->getRegdate("Y-m-d H:i:s")} - {$lang->cmd_select} + {$lang->cmd_select} {$lang->cmd_delete} @@ -61,7 +63,8 @@ event.preventDefault(); var document_srl = $(this).data('documentSrl'); var document_type = $(this).data('documentType'); - doDocumentSelect(document_srl, document_type); + var document_mid = $(this).data('documentMid'); + doDocumentSelect(document_srl, document_type, document_mid); }); $('.btn_delete_temp_saved').on('click', function(event) { event.preventDefault(); From 15f9f6a7bd69d34184084342f78f4091ff8b07fc Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 28 Jan 2026 21:17:26 +0900 Subject: [PATCH 6/9] Show proper 404 page when trying to access a document that is not public #2659 --- modules/board/board.view.php | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/modules/board/board.view.php b/modules/board/board.view.php index 5164d765e..e6cd6ee2d 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -313,37 +313,34 @@ class BoardView extends Board } } - // if the consultation function is enabled, and the document is not a notice + // if the consultation function is enabled, only the author can read the document. if($this->consultation && !$oDocument->isNotice()) { - $logged_info = Context::get('logged_info'); - if(abs($oDocument->get('member_srl')) != $logged_info->member_srl) + if (abs($oDocument->get('member_srl')) != $this->user->member_srl) { - $oDocument = DocumentModel::getDocument(0); + Context::set('document_srl', null, true); + $this->dispBoardMessage('msg_not_founded', 404); } } - // if the document is TEMP saved, check Grant + // if the document is TEMP saved, pretend that it doesn't exist. if($oDocument->getStatus() == 'TEMP') { - if(!$oDocument->isGranted()) - { - $oDocument = DocumentModel::getDocument(0); - } + Context::set('document_srl', null, true); + $this->dispBoardMessage('msg_not_founded', 404); } - } else { - // if the document is not existed, then alert a warning message + // if the document does not exist, then display a warning message. Context::set('document_srl', null, true); $this->dispBoardMessage('msg_not_founded', 404); } + } /** * if the document is not existed, get an empty document */ - } else { $oDocument = DocumentModel::getDocument(0); @@ -351,7 +348,7 @@ class BoardView extends Board } /** - *check the document view grant + * Check the document view grant */ if($oDocument->isExists()) { From f69dc966c511d2646469dbbd0f321688a82f6ab6 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 28 Jan 2026 21:25:29 +0900 Subject: [PATCH 7/9] Fix inconsistent placing of text and icon --- modules/admin/tpl/_dashboard_counter.html | 8 ++++---- modules/admin/tpl/_dashboard_default.html | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/admin/tpl/_dashboard_counter.html b/modules/admin/tpl/_dashboard_counter.html index 741c57441..ae41c93f2 100644 --- a/modules/admin/tpl/_dashboard_counter.html +++ b/modules/admin/tpl/_dashboard_counter.html @@ -10,7 +10,7 @@
{$lang->menu_gnb['user']}:
{number_format($status->member->totalCount)} (+{number_format($status->member->todayCount)})
- {$lang->details} + {$lang->details} {@ $dashboard_stack->left[] = ob_get_clean()} @@ -23,7 +23,7 @@
{$lang->menu_gnb_sub['document']}:
{number_format($status->document->totalCount)} (+{number_format($status->document->todayCount)})
- {$lang->details} + {$lang->details} @@ -48,7 +48,7 @@
  • {$lang->no_data}
  • -

    {$lang->more}

    +

    {$lang->more}

    {@ $dashboard_stack->right[] = ob_get_clean()} @@ -70,7 +70,7 @@
  • {$lang->no_data}
  • -

    {$lang->more}

    +

    {$lang->more}

    {@ $dashboard_stack->right[] = ob_get_clean()} diff --git a/modules/admin/tpl/_dashboard_default.html b/modules/admin/tpl/_dashboard_default.html index 2b95f7dc9..bd25973cc 100644 --- a/modules/admin/tpl/_dashboard_default.html +++ b/modules/admin/tpl/_dashboard_default.html @@ -14,7 +14,7 @@
    {$lang->menu_gnb['user']}:
    {number_format($status->member->totalCount)} (+{number_format($status->member->todayCount)})
    - {$lang->more} + {$lang->more} {@ $dashboard_stack->left[] = ob_get_clean()} @@ -42,7 +42,7 @@
    {$lang->menu_gnb_sub['document']}:
    {number_format($status->document->totalCount)} (+{number_format($status->document->todayCount)})
    - {$lang->more} + {$lang->more} {@ $dashboard_stack->right[] = ob_get_clean()} @@ -65,7 +65,7 @@
  • {$lang->no_data}
  • -

    {$lang->more}

    +

    {$lang->more}

    {@ $dashboard_stack->right[] = ob_get_clean()} From 078c07d9f5c1c72565fb7b30cad3c22353210693 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 28 Jan 2026 21:33:27 +0900 Subject: [PATCH 8/9] Add confirmation dialog before deleting or trashing document in admin dashboard #2653 --- common/lang/en.php | 1 + common/lang/ko.php | 1 + modules/admin/tpl/_dashboard_counter.html | 2 ++ modules/admin/tpl/_dashboard_default.html | 4 ++++ modules/admin/tpl/js/dashboard_default.js | 12 ++++++++++++ 5 files changed, 20 insertions(+) diff --git a/common/lang/en.php b/common/lang/en.php index 80add8d75..b63f049ac 100644 --- a/common/lang/en.php +++ b/common/lang/en.php @@ -307,6 +307,7 @@ $lang->confirm_vote = 'Are you sure you want to upvote?'; $lang->confirm_delete = 'Are you sure you want to delete?'; $lang->confirm_restore = 'Are you sure you want to restore?'; $lang->confirm_move = 'Are you sure you want to move?'; +$lang->confirm_trash = 'Are you sure you want to move to trash?'; $lang->confirm_reset = 'Are you sure you want to reset?'; $lang->confirm_leave = 'Are you sure you want to delete your account?'; $lang->confirm_update = 'Are you sure you want to update?'; diff --git a/common/lang/ko.php b/common/lang/ko.php index 44225b526..d12c63646 100644 --- a/common/lang/ko.php +++ b/common/lang/ko.php @@ -307,6 +307,7 @@ $lang->confirm_vote = '추천하시겠습니까?'; $lang->confirm_delete = '삭제하시겠습니까?'; $lang->confirm_restore = '복원하시겠습니까?'; $lang->confirm_move = '이동하시겠습니까?'; +$lang->confirm_trash = '휴지통으로 이동하시겠습니까?'; $lang->confirm_reset = '초기화하시겠습니까?'; $lang->confirm_leave = '탈퇴하시겠습니까?'; $lang->confirm_update = '수정하시겠습니까?'; diff --git a/modules/admin/tpl/_dashboard_counter.html b/modules/admin/tpl/_dashboard_counter.html index ae41c93f2..507e193ba 100644 --- a/modules/admin/tpl/_dashboard_counter.html +++ b/modules/admin/tpl/_dashboard_counter.html @@ -75,6 +75,8 @@ {@ $dashboard_stack->right[] = ob_get_clean()} diff --git a/modules/admin/tpl/js/dashboard_default.js b/modules/admin/tpl/js/dashboard_default.js index 1514d1c33..ce7c5190e 100644 --- a/modules/admin/tpl/js/dashboard_default.js +++ b/modules/admin/tpl/js/dashboard_default.js @@ -10,4 +10,16 @@ $(function() { $(this).removeClass('hover').find('>.action').hide(); } }); + var forms = $('.dashboard>div>section form.action'); + forms.on('click', 'button', function(e) { + var message; + if ($(this).val() === 'trash' || $(this).val() === 'true') { + message = xe.lang.confirm_trash; + } else { + message = xe.lang.confirm_delete; + } + if (!confirm(message)) { + e.preventDefault(); + } + }); }); From 6d85d0de6d90b8bf0f033a516a48a0b940f4dfad Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 28 Jan 2026 21:36:28 +0900 Subject: [PATCH 9/9] Add title in delete/trash confirmation dialog #2653 --- modules/admin/tpl/js/dashboard_default.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/admin/tpl/js/dashboard_default.js b/modules/admin/tpl/js/dashboard_default.js index ce7c5190e..5fc24228c 100644 --- a/modules/admin/tpl/js/dashboard_default.js +++ b/modules/admin/tpl/js/dashboard_default.js @@ -12,13 +12,14 @@ $(function() { }); var forms = $('.dashboard>div>section form.action'); forms.on('click', 'button', function(e) { + var title = $(this).closest('form').siblings('a').first().text(); var message; if ($(this).val() === 'trash' || $(this).val() === 'true') { message = xe.lang.confirm_trash; } else { message = xe.lang.confirm_delete; } - if (!confirm(message)) { + if (!confirm(title + "\n" + message)) { e.preventDefault(); } });