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('자동등록방지 숫자가 틀렸습니다.'); }