Compare commits

...
20 Commits
Author SHA1 Message Date
thisgun 58878593dc Merge branch 'master' of github.com:gnuboard/g5 2019-09-16 16:04:23 +09:00
thisgun d72a3b5a73 버전 5.3.3.3 수정 2019-09-16 11:39:25 +09:00
thisgun 47bee3d294 탈퇴한 회원이 비밀번호를 찾기 할수 있는 오류 수정 2019-09-16 11:15:18 +09:00
thisgun 8182cac90d XSS 취약점 수정 2019-09-16 10:36:10 +09:00
thisgun b4604fca67 [KVE-2019-1318] SQL Injection 취약점 수정 2019-09-09 12:27:14 +09:00
thisgun 7ad199ccd5 소셜 로그인 가입시 닉네임 중복 체크 코드 수정 2019-09-09 11:30:44 +09:00
thisgun f0e176033f 카카오 링크 v2 버전 코드 수정 2019-09-06 17:48:35 +09:00
thisgun d33753014c [KVE-2019-1162]임의 명령어 실행 취약점 수정 2019-09-06 12:28:27 +09:00
thisgun 3c55c4d60d 그누보드 Stored XSS 취약점(KVE-2019-1198) 수정 2019-08-29 14:44:47 +09:00
thisgun c2922aaa13 그누보드 XSS 취약점(KVE-2019-1235,1236,1238) 2019-08-29 12:23:29 +09:00
thisgun 120d42c431 카카오 소셜 로그인 설정 표시문 수정 2019-08-26 18:03:57 +09:00
thisgun 863f6011ac Merge branch 'master' of github.com:gnuboard/g5 2019-08-12 10:37:25 +09:00
thisgun 067bcd2046 버전 5.3.3.2 수정 2019-08-12 10:22:09 +09:00
thisgun a1633aec96 잘못된 php 코드 수정 2019-07-29 11:42:07 +09:00
thisgun f675c38441 관리자 회원메일발송 페이지 xss 취약점 수정 2019-07-19 19:58:12 +09:00
thisgun cee88a0f6f Merge branch 'master' of github.com:gnuboard/g5 2019-07-15 18:40:40 +09:00
thisgun cbde9c91d7 버전 5.3.3.1 으로 변경 2019-07-15 18:19:15 +09:00
thisgun c17fef6778 파이어폭스 68 버전에서 스마트에디터 오류 나는 부분을 예외처리 2019-07-15 18:18:24 +09:00
thisgun 73478d5961 KVE-2019-1142 LFI & Command Injection 취약점 수정 2019-07-09 14:11:48 +09:00
thisgun 846285549a 새글 삭제시 공지글이 풀리는 오류 수정 2019-07-08 16:05:14 +09:00
25 changed files with 112 additions and 62 deletions
+1 -1
View File
@@ -1067,7 +1067,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<input type="checkbox" name="cf_social_servicelist[]" id="check_social_kakao" value="kakao" <?php echo option_array_checked('kakao', $config['cf_social_servicelist']); ?> >
<label for="check_social_kakao">카카오 로그인을 사용합니다</label>
<div>
<h3>카카오 웹 Redirect Path</h3>
<h3>카카오 로그인 Redirect URI</h3>
<p><?php echo get_social_callbackurl('kakao', true); ?></p>
</div>
</div>
+2
View File
@@ -10,6 +10,8 @@ $html_title = '회원메일';
if ($w == 'u') {
$html_title .= '수정';
$readonly = ' readonly';
$ma_id = (int) $ma_id;
$sql = " select * from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
$ma = sql_fetch($sql);
+7 -5
View File
@@ -9,11 +9,13 @@ auth_check($auth[$sub_menu], 'w');
check_admin_token();
$ma_id = isset($_POST['ma_id']) ? (int) $_POST['ma_id'] : 0;
$ma_subject = isset($_POST['ma_subject']) ? strip_tags($_POST['ma_subject']) : '';
if ($w == '')
{
$sql = " insert {$g5['mail_table']}
set ma_id = '{$_POST['ma_id']}',
ma_subject = '{$_POST['ma_subject']}',
set ma_subject = '{$ma_subject}',
ma_content = '{$_POST['ma_content']}',
ma_time = '".G5_TIME_YMDHIS."',
ma_ip = '{$_SERVER['REMOTE_ADDR']}' ";
@@ -22,16 +24,16 @@ if ($w == '')
else if ($w == 'u')
{
$sql = " update {$g5['mail_table']}
set ma_subject = '{$_POST['ma_subject']}',
set ma_subject = '{$ma_subject}',
ma_content = '{$_POST['ma_content']}',
ma_time = '".G5_TIME_YMDHIS."',
ma_ip = '{$_SERVER['REMOTE_ADDR']}'
where ma_id = '{$_POST['ma_id']}' ";
where ma_id = '{$ma_id}' ";
sql_query($sql);
}
else if ($w == 'd')
{
$sql = " delete from {$g5['mail_table']} where ma_id = '{$_POST['ma_id']}' ";
$sql = " delete from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
sql_query($sql);
}
+1 -1
View File
@@ -306,7 +306,7 @@ if(!isset($qaconfig['qa_include_head'])) {
<tr>
<th scope="row"><label for="qa_insert_content">글쓰기 기본 내용</label></th>
<td>
<textarea id="qa_insert_content" name="qa_insert_content" rows="5"><?php echo $qaconfig['qa_insert_content'] ?></textarea>
<textarea id="qa_insert_content" name="qa_insert_content" rows="5"><?php echo html_purifier($qaconfig['qa_insert_content']); ?></textarea>
</td>
</tr>
<?php for ($i=1; $i<=5; $i++) { ?>
+2
View File
@@ -50,6 +50,8 @@ if( $qa_include_tail && ! is_include_path_check($qa_include_tail, 1) ){
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
}
$_POST['qa_title'] = strip_tags($_POST['qa_title']);
$sql = " update {$g5['qa_config_table']}
set qa_title = '{$_POST['qa_title']}',
qa_category = '{$_POST['qa_category']}',
+8 -5
View File
@@ -74,10 +74,13 @@ while($res = sql_fetch_array($qry))
";
}
$arr_ajax_msg['error'] = "";
$arr_ajax_msg['list_text'] = $list_text;
$arr_ajax_msg['page'] = $page;
$arr_ajax_msg['total_count'] = $total_count;
$arr_ajax_msg['total_page'] = $total_page;
$arr_ajax_msg = array(
'error'=>'',
'list_text'=>$list_text,
'page'=>$page,
'total_count'=>$total_count,
'total_page'=>$total_page
);
die( json_encode($arr_ajax_msg) );
?>
+5 -1
View File
@@ -12,6 +12,10 @@ if( $st && !in_array($st, array('hs_name', 'hs_hp', 'bk_no')) ){
$st = '';
}
if( $sst && !in_array($sst, array('mb_id', 'bk_no', 'hs_name', 'hs_hp', 'hs_datetime', 'hs_flag', 'hs_code', 'hs_memo', 'hs_log')) ){
$sst = '';
}
auth_check($auth[$sub_menu], "r");
$g5['title'] = "문자전송 상세내역";
@@ -22,7 +26,7 @@ if (!is_numeric($wr_no))
if ($spage < 1) $spage = 1;
if ($sst && trim($ssv))
$sql_search = " and $sst like '%$ssv%' ";
$sql_search = " and $sst like '%".sql_real_escape_string($ssv)."%' ";
else
$sql_search = "";
+2 -2
View File
@@ -51,9 +51,9 @@ else
// 다음 쪽지
$sql = " select * from {$g5[memo_table]}
$sql = " select * from {$g5['memo_table']}
where me_id < '{$me_id}'
and me_{$kind}_mb_id = '{$member[mb_id]}'
and me_{$kind}_mb_id = '{$member['mb_id']}'
order by me_id desc
limit 1 ";
$next = sql_fetch($sql);
+2 -2
View File
@@ -87,7 +87,7 @@ for($i=0;$i<count($_POST['chk_bn_id']);$i++)
$lf = '';
for ($k=0; $k<count($notice_array); $k++) {
if ((int)$write['wr_id'] != (int)$notice_array[$k])
$bo_notice .= $nl.$notice_array[$k];
$bo_notice .= $lf.$notice_array[$k];
if($bo_notice)
$lf = ',';
@@ -117,7 +117,7 @@ for($i=0;$i<count($_POST['chk_bn_id']);$i++)
// 코멘트 삭제
if (!delete_point($write['mb_id'], $bo_table, $comment_id, '코멘트')) {
insert_point($write['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write[wr_parent]}-{$comment_id} 코멘트삭제");
insert_point($write['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_parent']}-{$comment_id} 코멘트삭제");
}
// 코멘트 삭제
+2 -2
View File
@@ -21,9 +21,9 @@ $row = sql_fetch($sql);
if ($row['cnt'] > 1)
alert('동일한 메일주소가 2개 이상 존재합니다.\\n\\n관리자에게 문의하여 주십시오.');
$sql = " select mb_no, mb_id, mb_name, mb_nick, mb_email, mb_datetime from {$g5['member_table']} where mb_email = '$email' ";
$sql = " select mb_no, mb_id, mb_name, mb_nick, mb_email, mb_datetime, mb_leave_date from {$g5['member_table']} where mb_email = '$email' ";
$mb = sql_fetch($sql);
if (!$mb['mb_id'])
if (!$mb['mb_id'] || $mb['mb_leave_date'])
alert('존재하지 않는 회원입니다.');
else if (is_admin($mb['mb_id']))
alert('관리자 아이디는 접근 불가합니다.');
+1 -1
View File
@@ -67,7 +67,7 @@ if(is_file($skin_file)) {
$content = '';
if ($w == '') {
$content = $qaconfig['qa_insert_content'];
$content = html_purifier($qaconfig['qa_insert_content']);
} else if($w == 'r') {
if($is_dhtml_editor)
$content = '<div><br><br><br>====== 이전 답변내용 =======<br></div>';
+1 -1
View File
@@ -5,7 +5,7 @@
********************/
define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.3.3');
define('G5_GNUBOARD_VER', '5.3.3.3');
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true);
+5 -2
View File
@@ -3510,7 +3510,7 @@ function is_include_path_check($path='', $is_input='')
// 장태진 @jtjisgod <jtjisgod@gmail.com> 추가
// 보안 목적 : rar wrapper 차단
if( stripos($path, 'rar:') !== false || stripos($path, 'php:') !== false || stripos($path, 'zlib:') !== false || stripos($path, 'bzip2:') !== false || stripos($path, 'zip:') !== false || stripos($path, 'data:') !== false || stripos($path, 'phar:') !== false ){
if( stripos($path, 'rar:') !== false || stripos($path, 'php:') !== false || stripos($path, 'zlib:') !== false || stripos($path, 'bzip2:') !== false || stripos($path, 'zip:') !== false || stripos($path, 'data:') !== false || stripos($path, 'phar:') !== false || stripos($path, 'file:') !== false ){
return false;
}
@@ -3561,12 +3561,15 @@ function is_include_path_check($path='', $is_input='')
if( preg_match('/\/data\/(file|editor|qa|cache|member|member_image|session|tmp)\/[A-Za-z0-9_]{1,20}\//i', $replace_path) ){
return false;
}
if( (preg_match('/\.\.\//i', $replace_path) || preg_match('/^\/.*/i', $replace_path)) && preg_match('/plugin\//i', $replace_path) && preg_match('/okname\//i', $replace_path) ){
if( preg_match('/'.G5_PLUGIN_DIR.'\//i', $replace_path) && (preg_match('/'.G5_OKNAME_DIR.'\//i', $replace_path) || preg_match('/'.G5_KCPCERT_DIR.'\//i', $replace_path) || preg_match('/'.G5_LGXPAY_DIR.'\//i', $replace_path)) ){
return false;
}
if( substr_count($replace_path, './') > 5 ){
return false;
}
if( defined('G5_SHOP_DIR') && preg_match('/'.G5_SHOP_DIR.'\//i', $replace_path) && preg_match('/kcp\//i', $replace_path) ){
return false;
}
}
$extension = pathinfo($path, PATHINFO_EXTENSION);
+17 -12
View File
@@ -20339,18 +20339,23 @@ nhn.husky.HuskyCore.mixin(nhn.husky.SE2M_TableEditor, {
addCSSClass : function(sClassName, sClassRule){
var oDoc = this.oApp.getWYSIWYGDocument();
if(oDoc.styleSheets[0] && oDoc.styleSheets[0].addRule){
// IE
oDoc.styleSheets[0].addRule("." + sClassName, sClassRule);
}else{
// FF
var elHead = oDoc.getElementsByTagName("HEAD")[0];
var elStyle = oDoc.createElement ("STYLE");
//styleElement.type = "text / css";
elHead.appendChild (elStyle);
elStyle.sheet.insertRule("." + sClassName + " { "+sClassRule+" }", 0);
}
try {
if(oDoc.styleSheets[0] && oDoc.styleSheets[0].addRule){
// IE
oDoc.styleSheets[0].addRule("." + sClassName, sClassRule);
}else{
// FF
var elHead = oDoc.getElementsByTagName("HEAD")[0];
var elStyle = oDoc.createElement ("STYLE");
//styleElement.type = "text / css";
elHead.appendChild (elStyle);
elStyle.sheet.insertRule("." + sClassName + " { "+sClassRule+" }", 0);
}
} catch (e) {
//console.log(e);
}
},
// [SMARTEDITORSUS-1533]
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -5,7 +5,7 @@ if(!$config['cf_cert_use'] || $config['cf_cert_hp'] != 'kcb')
alert('기본환경설정에서 KCB 휴대폰본인확인 서비스로 설정해 주십시오.');
// key 디렉토리 체크
include_once('./key_dir_check.php');
require_once('./key_dir_check.php');
/**************************************************************************
* okname 생년월일 본인 확인서비스 파라미터
+2 -2
View File
@@ -15,8 +15,8 @@ foreach($check_arrays as $key){
certify_count_check($member['mb_id'], 'hp');
// KISA 취약점 내용(KVE-2018-0291) hpcert1.php의 $cmd 함수에 대한 인자 값은 hpcert_config.php 파일에서 설정되나, 이를 다른 페이지에서 포함한 뒤 호출할 시 임의 값 설정 가능
// 이에 include_once 를 include 로 수정함
include('./hpcert.config.php');
// 이에 include_once 를 require 로 수정함
require('./hpcert.config.php');
/**************************************************************************
okname 실행
**************************************************************************/
+3 -3
View File
@@ -1,7 +1,7 @@
<?php
include_once('./_common.php');
$check_arrays = array('exe', 'keypath', 'memId', 'endPointURL', 'logPath');
$check_arrays = array('exe', 'keypath', 'memId', 'endPointURL', 'endPointUrl', 'logPath');
foreach($check_arrays as $key){
if( isset($_REQUEST[$key]) && $_REQUEST[$key] ){
@@ -12,8 +12,8 @@ foreach($check_arrays as $key){
}
// KISA 취약점 내용(KVE-2018-0291) hpcert1.php의 $cmd 함수에 대한 인자 값은 hpcert_config.php 파일에서 설정되나, 이를 다른 페이지에서 포함한 뒤 호출할 시 임의 값 설정 가능
// 이에 include_once 를 include 로 수정함
include('./hpcert.config.php');
// 이에 include_once 를 require 로 수정함
require('./hpcert.config.php');
/**************************************************************************
파일명 : safe_hs_cert3.php
+1 -1
View File
@@ -5,7 +5,7 @@ if(!$config['cf_cert_use'] || $config['cf_cert_ipin'] != 'kcb')
alert('기본환경설정에서 KCB 아이핀 본인확인 서비스로 설정해 주십시오.');
// key 디렉토리 체크
include_once('./key_dir_check.php');
require_once('./key_dir_check.php');
$exe = '';
// 실행모듈
+2 -2
View File
@@ -15,8 +15,8 @@ foreach($check_arrays as $key){
certify_count_check($member['mb_id'], 'ipin');
// KISA 취약점 내용(KVE-2018-0291) hpcert1.php의 $cmd 함수에 대한 인자 값은 hpcert_config.php 파일에서 설정되나, 이를 다른 페이지에서 포함한 뒤 호출할 시 임의 값 설정 가능
// 이에 include_once 를 include 로 수정함
include('./ipin.config.php');
// 이에 include_once 를 require 로 수정함
require('./ipin.config.php');
$option = "C";// Option
+1 -1
View File
@@ -11,7 +11,7 @@ foreach($check_arrays as $key){
$$key = '';
}
include('./ipin.config.php');
require('./ipin.config.php');
//아이핀팝업에서 조회한 PERSONALINFO이다.
@$encPsnlInfo = $_POST["encPsnlInfo"];
+10 -5
View File
@@ -18,6 +18,8 @@ if (is_numeric($fg_no))
else
$sql_group = "";
$sv = isset($sv) ? get_search_string($sv) : '';
if ($st == 'all') {
$sql_search = "and (fo_name like '%{$sv}%' or fo_content like '%{$sv}%')";
} else if ($st == 'name') {
@@ -61,10 +63,13 @@ for($k=0;$res = sql_fetch_array($qry);$k++)
$list_text[$k]['fo_name'] = cut_str($res['fo_name'],20);
}
$arr_ajax_msg['error'] = "";
$arr_ajax_msg['list_text'] = $list_text;
$arr_ajax_msg['page'] = $page;
$arr_ajax_msg['total_count'] = $total_count;
$arr_ajax_msg['total_page'] = $total_page;
$arr_ajax_msg = array(
'error'=>'',
'list_text'=>$list_text,
'page'=>$page,
'total_count'=>$total_count,
'total_page'=>$total_page
);
die( json_encode($arr_ajax_msg) );
?>
+33 -6
View File
@@ -24,11 +24,38 @@ $bo_v_sns_class = $config['cf_kakao_js_apikey'] ? 'show_kakao' : '';
?>
<?php if($config['cf_kakao_js_apikey']) { ?>
<script src="//developers.kakao.com/sdk/js/kakao.min.js"></script>
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>
<script>
// 사용할 앱의 Javascript 키를 설정해 주세요.
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
<script src="//developers.kakao.com/sdk/js/kakao.min.js" charset="utf-8"></script>
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js" charset="utf-8"></script>
<script type='text/javascript'>
//<![CDATA[
// 사용할 앱의 Javascript 키를 설정해 주세요.
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
function Kakao_sendLink() {
var webUrl = location.protocol+"<?php echo '//'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; ?>",
imageUrl = $("#bo_v_img").find("img").attr("src") || $(".view_image").find("img").attr("src") || '';
Kakao.Link.sendDefault({
objectType: 'feed',
content: {
title: "<?php echo str_replace(array('%27', '&#034;' , '\"'), '', strip_tags($view['subject'])); ?>",
description: "<?php echo preg_replace('/\r\n|\r|\n/','', strip_tags(get_text(cut_str(strip_tags($view['wr_content']), 200), 1))); ?>",
imageUrl: imageUrl,
link: {
mobileWebUrl: webUrl,
webUrl: webUrl
}
},
buttons: [{
title: '자세히 보기',
link: {
mobileWebUrl: webUrl,
webUrl: webUrl
}
}]
});
}
//]]>
</script>
<?php } ?>
<div class="bo_v_snswr">
@@ -39,7 +66,7 @@ $bo_v_sns_class = $config['cf_kakao_js_apikey'] ? 'show_kakao' : '';
<li><a href="<?php echo $facebook_url; ?>" target="_blank" class="sns_f"><img src="<?php echo G5_SNS_URL; ?>/icon/facebook.png" alt="페이스북으로 보내기" width="20"></a></li>
<li><a href="<?php echo $gplus_url; ?>" target="_blank" class="sns_g"><img src="<?php echo G5_SNS_URL; ?>/icon/gplus.png" alt="구글플러스로 보내기" width="20"></a></li>
<?php if($config['cf_kakao_js_apikey']) { ?>
<li><a href="javascript:kakaolink_send('<?php echo str_replace(array('%27', '\''), '', $sns_msg); ?>', '<?php echo urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); ?>');" class="sns_k" ><img src="<?php echo G5_SNS_URL; ?>/icon/kakaotalk.png" alt="카카오톡으로 보내기" width="20"></a></li>
<li><a href="javascript:Kakao_sendLink();" class="sns_k" ><img src="<?php echo G5_SNS_URL; ?>/icon/kakaotalk.png" alt="카카오톡으로 보내기" width="20"></a></li>
<?php } ?>
</ul>
</div>
-4
View File
@@ -48,10 +48,6 @@ function get_social_callbackurl($provider, $no_domain=false){
$base_url = G5_SOCIAL_LOGIN_BASE_URL;
if( $provider === 'kakao' && $no_domain ){
$base_url = '/'.ltrim(parse_url($base_url, PHP_URL_PATH), '/');
}
if ( $provider === 'twitter' ){
return $base_url;
}
+1
View File
@@ -44,6 +44,7 @@ if( ! $mb_nick || ! $mb_name ){
$tmp = explode('@', $mb_email);
$mb_nick = $mb_nick ? $mb_nick : $tmp[0];
$mb_name = $mb_name ? $mb_name : $tmp[0];
$mb_nick = exist_mb_nick_recursive($mb_nick, '');
}
if( ! isset($mb_password) || ! $mb_password ){