security: KVE-2026-1899 KVE-2026-1900 KVE-2026-1909 입력 및 권한 검증 강화
상품 정렬값을 허용 목록으로 검증하고 관리자 권한 컨텍스트를 명확히 구분한다. 모바일 KCP의 Windows 명령 인자를 안전하게 조립하고 검증한다.
This commit is contained in:
1 parent
375a8336e8
commit
71209fc7c9
40 files changed
+185
-148
No files matched your search
+3
-1
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$is_admin = get_super_admin_type($is_admin);
|
||||
|
||||
if($is_guest)
|
||||
alert('회원이시라면 로그인 후 이용해 주십시오.', G5_URL);
|
||||
|
||||
@@ -93,4 +95,4 @@ for($i=0; $i<$count; $i++) {
|
||||
*/
|
||||
run_event('qa_delete', $tmp_array, $deleted);
|
||||
|
||||
goto_url(G5_BBS_URL.'/qalist.php'.preg_replace('/^&/', '?', $qstr));
|
||||
goto_url(G5_BBS_URL.'/qalist.php'.preg_replace('/^&/', '?', $qstr));
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$is_admin = get_super_admin_type($is_admin);
|
||||
|
||||
// clean the output buffer
|
||||
ob_end_clean();
|
||||
|
||||
@@ -85,4 +87,4 @@ while(!feof($fp)) {
|
||||
usleep(1000);
|
||||
}
|
||||
fclose ($fp);
|
||||
flush();
|
||||
flush();
|
||||
+6
-4
@@ -1,13 +1,15 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$is_admin = get_super_admin_type($is_admin);
|
||||
|
||||
if($is_guest)
|
||||
alert('회원이시라면 로그인 후 이용해 보십시오.', './login.php?url='.urlencode(G5_BBS_URL.'/qalist.php'));
|
||||
|
||||
$qaconfig = get_qa_config();
|
||||
|
||||
$token = '';
|
||||
if( $is_admin ){
|
||||
if($is_admin === 'super') {
|
||||
$token = _token();
|
||||
set_session('ss_qa_delete_token', $token);
|
||||
}
|
||||
@@ -16,7 +18,7 @@ $g5['title'] = $qaconfig['qa_title'];
|
||||
include_once('./qahead.php');
|
||||
|
||||
$skin_file = $qa_skin_path.'/list.skin.php';
|
||||
$is_auth = $is_admin ? true : false;
|
||||
$is_auth = ($is_admin === 'super');
|
||||
|
||||
$category_option = '';
|
||||
|
||||
@@ -132,7 +134,7 @@ if(is_file($skin_file)) {
|
||||
|
||||
$is_checkbox = false;
|
||||
$admin_href = '';
|
||||
if($is_admin) {
|
||||
if($is_admin === 'super') {
|
||||
$is_checkbox = true;
|
||||
$admin_href = G5_ADMIN_URL.'/qa_config.php';
|
||||
}
|
||||
@@ -148,4 +150,4 @@ if(is_file($skin_file)) {
|
||||
echo '<div>'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.</div>';
|
||||
}
|
||||
|
||||
include_once('./qatail.php');
|
||||
include_once('./qatail.php');
|
||||
+5
-3
@@ -2,6 +2,8 @@
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
$is_admin = get_super_admin_type($is_admin);
|
||||
|
||||
$qa_id = isset($_REQUEST['qa_id']) ? (int) $_REQUEST['qa_id'] : 0;
|
||||
|
||||
if($is_guest)
|
||||
@@ -115,7 +117,7 @@ if(is_file($skin_file)) {
|
||||
}
|
||||
*/
|
||||
|
||||
if(($view['qa_type'] && $is_admin) || (!$view['qa_type'] && $view['qa_status'] == 0)) {
|
||||
if(($view['qa_type'] && $is_admin === 'super') || (!$view['qa_type'] && $view['qa_status'] == 0)) {
|
||||
$update_href = G5_BBS_URL.'/qawrite.php?w=u&qa_id='.$view['qa_id'].$qstr;
|
||||
$delete_href = G5_BBS_URL.'/qadelete.php?qa_id='.$view['qa_id'].'&token='.$token.$qstr;
|
||||
}
|
||||
@@ -131,7 +133,7 @@ if(is_file($skin_file)) {
|
||||
and qa_parent = '{$view['qa_id']}' ";
|
||||
$answer = sql_fetch($sql);
|
||||
|
||||
if($is_admin) {
|
||||
if($is_admin === 'super') {
|
||||
$answer_update_href = G5_BBS_URL.'/qawrite.php?w=u&qa_id='.$answer['qa_id'].$qstr;
|
||||
$answer_delete_href = G5_BBS_URL.'/qadelete.php?qa_id='.$answer['qa_id'].'&token='.$token.$qstr;
|
||||
}
|
||||
@@ -216,4 +218,4 @@ if(is_file($skin_file)) {
|
||||
echo '<div>'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.</div>';
|
||||
}
|
||||
|
||||
include_once('./qatail.php');
|
||||
include_once('./qatail.php');
|
||||
+7
-5
@@ -2,6 +2,8 @@
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
$is_admin = get_super_admin_type($is_admin);
|
||||
|
||||
if($w != '' && $w != 'u' && $w != 'r') {
|
||||
alert('올바른 방법으로 이용해 주십시오.');
|
||||
}
|
||||
@@ -30,7 +32,7 @@ if(is_file($skin_file)) {
|
||||
|
||||
if($w == 'u' || $w == 'r') {
|
||||
$sql = " select * from {$g5['qa_content_table']} where qa_id = '$qa_id' ";
|
||||
if(!$is_admin) {
|
||||
if($is_admin !== 'super') {
|
||||
$sql .= " and mb_id = '{$member['mb_id']}' ";
|
||||
}
|
||||
|
||||
@@ -40,7 +42,7 @@ if(is_file($skin_file)) {
|
||||
if(!$write['qa_id'])
|
||||
alert('게시글이 존재하지 않습니다.\\n삭제되었거나 자신의 글이 아닌 경우입니다.');
|
||||
|
||||
if(!$is_admin) {
|
||||
if($is_admin !== 'super') {
|
||||
if($write['qa_type'] == 0 && $write['qa_status'] == 1)
|
||||
alert('답변이 등록된 문의글은 수정할 수 없습니다.');
|
||||
|
||||
@@ -117,7 +119,7 @@ if(is_file($skin_file)) {
|
||||
if($w == '' || $w == 'r')
|
||||
$write['qa_email'] = $member['mb_email'];
|
||||
|
||||
if($w == 'u' && $is_admin && $write['qa_type'])
|
||||
if($w == 'u' && $is_admin === 'super' && $write['qa_type'])
|
||||
$is_email = false;
|
||||
}
|
||||
|
||||
@@ -132,7 +134,7 @@ if(is_file($skin_file)) {
|
||||
if($w == '' || $w == 'r')
|
||||
$write['qa_hp'] = $member['mb_hp'];
|
||||
|
||||
if($w == 'u' && $is_admin && $write['qa_type'])
|
||||
if($w == 'u' && $is_admin === 'super' && $write['qa_type'])
|
||||
$is_hp = false;
|
||||
}
|
||||
|
||||
@@ -145,4 +147,4 @@ if(is_file($skin_file)) {
|
||||
echo '<div>'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.</div>';
|
||||
}
|
||||
|
||||
include_once('./qatail.php');
|
||||
include_once('./qatail.php');
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$is_admin = get_super_admin_type($is_admin);
|
||||
|
||||
/*==========================
|
||||
$w == a : 답변
|
||||
$w == r : 추가질문
|
||||
@@ -185,8 +187,8 @@ for ($i=1; $i<=$upload_count; $i++) {
|
||||
}
|
||||
|
||||
if (is_uploaded_file($tmp_file)) {
|
||||
// 관리자가 아니면서 설정한 업로드 사이즈보다 크다면 건너뜀
|
||||
if (!$is_admin && $filesize > $qaconfig['qa_upload_size']) {
|
||||
// 최고관리자가 아니면서 설정한 업로드 사이즈보다 크다면 건너뜀
|
||||
if ($is_admin !== 'super' && $filesize > $qaconfig['qa_upload_size']) {
|
||||
$file_upload_msg .= '"'.$filename.'" 파일의 용량('.number_format($filesize).' 바이트)이 게시판에 설정('.number_format($qaconfig['qa_upload_size']).' 바이트)된 값보다 크므로 업로드 하지 않습니다.\\n';
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user