From 3f7068541f447a9a0fdc0b30baa67d5d26a4187f Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 26 Apr 2016 17:56:14 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=84=EB=B0=80=EA=B8=80=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/write_update.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/bbs/write_update.php b/bbs/write_update.php index 4bf43a4ac..7b57aa085 100644 --- a/bbs/write_update.php +++ b/bbs/write_update.php @@ -77,10 +77,16 @@ if ($w == 'u' || $w == 'r') { } // 외부에서 글을 등록할 수 있는 버그가 존재하므로 비밀글은 사용일 경우에만 가능해야 함 -if (!$is_admin && !$board['bo_use_secret'] && $secret) { +if (!$is_admin && !$board['bo_use_secret'] && (stripos($_POST['html'], 'secret') !== false || stripos($_POST['secret'], 'secret') !== false || stripos($_POST['mail'], 'secret') !== false)) { alert('비밀글 미사용 게시판 이므로 비밀글로 등록할 수 없습니다.'); } +$secret = ''; +if (isset($_POST['secret']) && $_POST['secret']) { + if(preg_match('#secret#', strtolower($_POST['secret']), $matches)) + $secret = $matches[0]; +} + // 외부에서 글을 등록할 수 있는 버그가 존재하므로 비밀글 무조건 사용일때는 관리자를 제외(공지)하고 무조건 비밀글로 등록 if (!$is_admin && $board['bo_use_secret'] == 2) { $secret = 'secret'; @@ -88,12 +94,14 @@ if (!$is_admin && $board['bo_use_secret'] == 2) { $html = ''; if (isset($_POST['html']) && $_POST['html']) { - $html = $_POST['html']; + if(preg_match('#html(1|2)#', strtolower($_POST['html']), $matches)) + $html = $matches[0]; } $mail = ''; if (isset($_POST['mail']) && $_POST['mail']) { - $mail = $_POST['mail']; + if(preg_match('#mail#', strtolower($_POST['mail']), $matches)) + $mail = $matches[0]; } $notice = '';