[KVE-2020-0288,0319,0320]그누보드 다중 취약점 수정
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$sub_menu = "100200";
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
@ -11,6 +12,12 @@ if (!$mb['mb_id'])
|
||||
|
||||
check_admin_token();
|
||||
|
||||
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
||||
|
||||
if (!chk_captcha()) {
|
||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
||||
}
|
||||
|
||||
$sql = " insert into {$g5['auth_table']}
|
||||
set mb_id = '{$_POST['mb_id']}',
|
||||
au_menu = '{$_POST['au_menu']}',
|
||||
@ -26,5 +33,15 @@ if (!$result) {
|
||||
|
||||
//sql_query(" OPTIMIZE TABLE `$g5['auth_table']` ");
|
||||
|
||||
// 세션을 체크하여 하루에 한번만 메일알림이 가게 합니다.
|
||||
if( str_replace('-', '', G5_TIME_YMD) !== get_session('adm_auth_update') ){
|
||||
$site_url = preg_replace('/^www\./', '', strtolower($_SERVER['SERVER_NAME']));
|
||||
$to_email = 'gnuboard@'.$site_url;
|
||||
|
||||
mailer($config['cf_admin_email_name'], $to_email, $config['cf_admin_email'], '['.$config['cf_title'].'] 관리권한설정 알림', '<p><b>['.$config['cf_title'].'] 관리권한설정 변경 안내</b></p><p style="padding-top:1em">회원 아이디 '.$mb['mb_id'].' 에 관리권한이 추가 되었습니다.</p><p style="padding-top:1em">'.G5_TIME_YMDHIS.'</p><p style="padding-top:1em"><a href="'.G5_URL.'" target="_blank">'.$config['cf_title'].'</a></p>', 1);
|
||||
|
||||
set_session('adm_auth_update', str_replace('-', '', G5_TIME_YMD));
|
||||
}
|
||||
|
||||
goto_url('./auth_list.php?'.$qstr);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user