From 54171e1903193f71e1ca7d50e2405e9295fa32b0 Mon Sep 17 00:00:00 2001 From: thisgun Date: Tue, 2 Sep 2025 18:27:55 +0900 Subject: [PATCH] =?UTF-8?q?5.6.16=20=EB=B2=84=EC=A0=84=EC=97=90=EC=84=9C?= =?UTF-8?q?=20=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EC=83=9D=EC=84=B1=EC=9D=B4=20?= =?UTF-8?q?=EC=95=88=EB=90=98=EB=8A=94=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/board_form.php | 2 +- adm/board_form_update.php | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/adm/board_form.php b/adm/board_form.php index a28cd6aa6..640fffd55 100644 --- a/adm/board_form.php +++ b/adm/board_form.php @@ -1439,7 +1439,7 @@ function frm_check_file(){ return false; } else { - jQuery("#admin_captcha_box").hide(); + // jQuery("#admin_captcha_box").hide(); } return true; diff --git a/adm/board_form_update.php b/adm/board_form_update.php index dbd48dc39..b5f7364b7 100644 --- a/adm/board_form_update.php +++ b/adm/board_form_update.php @@ -36,10 +36,24 @@ if ($w == '' && in_array($bo_table, get_bo_table_banned_word())) { $bo_include_head = isset($_POST['bo_include_head']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['bo_include_head'], 0, 255)) : ''; $bo_include_tail = isset($_POST['bo_include_tail']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['bo_include_tail'], 0, 255)) : ''; -// 관리자가 자동등록방지를 사용해야 할 경우 -if ($board && (isset($board['bo_include_head']) && $board['bo_include_head'] !== $bo_include_head || $board['bo_include_tail'] !== $bo_include_tail)) { - include_once(G5_CAPTCHA_PATH . '/captcha.lib.php'); +$check_captcha = false; +// 관리자가 자동등록방지 CAPTCHA를 사용해야 할 경우 +if ($w === 'u') { + if (isset($board['bo_include_head'], $board['bo_include_tail']) && + ($board['bo_include_head'] !== $bo_include_head || $board['bo_include_tail'] !== $bo_include_tail)) { + $check_captcha = true; + } +} elseif ($w === '') { + if ($bo_include_head !== '_head.php' || $bo_include_tail !== '_tail.php') { + $check_captcha = true; + } +} + +// 실제 CAPTCHA 검증 +if ($check_captcha) { + include_once(G5_CAPTCHA_PATH . '/captcha.lib.php'); + if (!chk_captcha()) { alert('자동등록방지 숫자가 틀렸습니다.'); }