5.6.16 버전에서 게시판 생성이 안되는 오류 수정

This commit is contained in:
thisgun
2025-09-02 18:27:55 +09:00
parent 44172c1d1f
commit 54171e1903
2 changed files with 18 additions and 4 deletions

View File

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