From 9a11d40a6aaa0583dc2753c3fe8af446a4cef036 Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 21 Jan 2014 11:17:39 +0900 Subject: [PATCH 1/5] =?UTF-8?q?input=20vars=20=EA=B0=9C=EC=88=98=20?= =?UTF-8?q?=EC=B2=B4=ED=81=AC=ED=95=A8=EC=88=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/common.lib.php b/lib/common.lib.php index 23c322b23..cd8d079ab 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2514,4 +2514,22 @@ function print_address($addr1, $addr2, $addr3) return $address; } + +// input vars 체크 +function check_input_vars() +{ + $max_input_vars = ini_get('max_input_vars'); + + if($max_input_vars) { + $post_vars = count($_POST, COUNT_RECURSIVE); + $get_vars = count($_GET, COUNT_RECURSIVE); + $cookie_vars = count($_COOKIE, COUNT_RECURSIVE); + + $input_vars = $post_vars + $get_vars + $cookie_vars; + + if($input_vars > $max_input_vars) { + alert('폼에서 전송된 변수의 개수가 max_input_vars 값보다 큽니다.\\n전송된 값중 일부는 유실되어 DB에 기록될 수 있습니다.\\n\\n문제를 해결하기 위해서는 서버 php.ini의 max_input_vars 값을 변경하십시오.'); + } + } +} ?> \ No newline at end of file From 80af2a0f8c639f515c53246af866246f29787e3f Mon Sep 17 00:00:00 2001 From: kagla Date: Tue, 21 Jan 2014 13:40:42 +0900 Subject: [PATCH 2/5] =?UTF-8?q?/.htaccess=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 96ca0ceec..8b781d5d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ !.gitignore -.htaccess +/.htaccess data/ test/ sirgle/ From 2bdee0f848eabe06aab0080d06feb38ab7be6263 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 23 Jan 2014 12:46:21 +0900 Subject: [PATCH 3/5] =?UTF-8?q?1:1=EB=AC=B8=EC=9D=98=20=ED=9C=B4=EB=8C=80?= =?UTF-8?q?=ED=8F=B0=EB=B2=88=ED=98=B8=20=EC=9E=85=EB=A0=A5=EC=97=90=20?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=9E=85=EB=A0=A5?= =?UTF-8?q?=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8A=94=20=EB=AC=B8=EC=A0=9C?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20-=20I2sec=20=EC=A7=80=EB=AF=BC=EA=B1=B4?= =?UTF-8?q?=EB=8B=98=20=EC=A0=9C=EB=B3=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/qawrite_update.php | 3 +++ mobile/skin/qa/basic/write.skin.php | 10 +++++++++- skin/qa/basic/write.skin.php | 10 +++++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/bbs/qawrite_update.php b/bbs/qawrite_update.php index 396080891..c6fde25d5 100644 --- a/bbs/qawrite_update.php +++ b/bbs/qawrite_update.php @@ -33,6 +33,9 @@ if (!empty($msg)) { alert($msg); } +if($qa_hp) + $qa_hp = preg_replace('/[^0-9\-]/', '', strip_tags($qa_hp)); + // 090710 if (substr_count($qa_content, '&#') > 50) { alert('내용에 올바르지 않은 코드가 다수 포함되어 있습니다.'); diff --git a/mobile/skin/qa/basic/write.skin.php b/mobile/skin/qa/basic/write.skin.php index c7fa1e568..afd1a6ef4 100644 --- a/mobile/skin/qa/basic/write.skin.php +++ b/mobile/skin/qa/basic/write.skin.php @@ -63,7 +63,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 - class="frm_input" size="30"> + class="frm_input" size="30"> > 답변등록 SMS알림 수신 @@ -166,6 +166,14 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 return false; } + + var hp = f.qa_hp.value.replace(/[0-9\-]/g, ""); + if(hp.length > 0) { + alert("휴대폰번호는 숫자, - 으로만 입력해 주십시오."); + return false; + } + + document.getElementById("btn_submit").disabled = "disabled"; return true; diff --git a/skin/qa/basic/write.skin.php b/skin/qa/basic/write.skin.php index 817e8f943..e34181369 100644 --- a/skin/qa/basic/write.skin.php +++ b/skin/qa/basic/write.skin.php @@ -63,7 +63,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 - class="frm_input" size="30"> + class="frm_input" size="30"> > 답변등록 SMS알림 수신 @@ -166,6 +166,14 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 return false; } + + var hp = f.qa_hp.value.replace(/[0-9\-]/g, ""); + if(hp.length > 0) { + alert("휴대폰번호는 숫자, - 으로만 입력해 주십시오."); + return false; + } + + document.getElementById("btn_submit").disabled = "disabled"; return true; From 8b308577018d5944a977610bd24014f602953b82 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 23 Jan 2014 13:15:06 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EB=B3=B5?= =?UTF-8?q?=EC=82=AC=EC=8B=9C=20=EA=B8=B0=EB=B3=B8=20=EC=97=94=EC=A7=84=20?= =?UTF-8?q?MyISAM=20=EC=84=A4=EC=A0=95=EB=90=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common.lib.php b/lib/common.lib.php index cd8d079ab..c32b97f4e 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1531,7 +1531,7 @@ function get_table_define($table, $crlf="\n") $schema_create .= implode($columns, ', ') . ')'; } // end while - $schema_create .= $crlf . ') DEFAULT CHARSET=utf8'; + $schema_create .= $crlf . ') ENGINE=MyISAM DEFAULT CHARSET=utf8'; return $schema_create; } // end of the 'PMA_getTableDef()' function From b675b026040db4fcc6eae624850e7dda9be86a14 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 23 Jan 2014 13:36:24 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=EB=A9=94=EB=AA=A8=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=20me=5Frecv=5Fmb=5Fid=EC=97=90=20=EC=9D=B8=EB=8D=B1?= =?UTF-8?q?=EC=8A=A4=20=EC=84=A4=EC=A0=95=20=EC=B6=94=EA=B0=80=20-=20?= =?UTF-8?q?=EC=8D=AC=EC=93=B0=ED=8C=8C=EB=8D=94=EB=8B=98=20=EA=B1=B4?= =?UTF-8?q?=EC=9D=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/gnuboard5.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/gnuboard5.sql b/install/gnuboard5.sql index dbfcb56a5..5b1177987 100644 --- a/install/gnuboard5.sql +++ b/install/gnuboard5.sql @@ -507,7 +507,8 @@ CREATE TABLE IF NOT EXISTS `g5_memo` ( `me_send_datetime` datetime NOT NULL default '0000-00-00 00:00:00', `me_read_datetime` datetime NOT NULL default '0000-00-00 00:00:00', `me_memo` text NOT NULL, - PRIMARY KEY (`me_id`) + PRIMARY KEY (`me_id`), + KEY `me_recv_mb_id` (`me_recv_mb_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- --------------------------------------------------------