[KVE-2026-1806] 콘텐츠 include 경로 및 미완료주문 출력 처리 보강

콘텐츠 상단/하단 파일 경로를 저장 전에 먼저 정규화한 뒤 확장자와 위치를
검증하도록 순서를 조정한다. 정규화 과정에서 확장자가 사라져 검증을
우회하던 경로를 차단한다. 실행 직전 bbs/content.php 에서도 승인 확장자와
data 디렉터리 귀결 여부를 다시 확인하는 is_content_include_allowed() 를
적용하고, 콘텐츠 상단/하단 이미지 업로드는 이미지 파일만 허용하도록 검사한다.

미완료주문 상세의 결제방법 출력에 get_text() 인코딩을 적용하고, 임시주문
저장 시 정제한 결제수단 값을 원본에도 반영한다. 개인결제 주문 세션은
결제정보 검증을 통과한 뒤에만 설정한다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 196255d76912531d7e13861821bd59ca15c967d1)
This commit is contained in:
thisgun committed 2026-08-24 07:44:22 +00:00
1 parent 35acbfa750
commit 6571119db6
6 files changed
+65 -10

No files matched your search

+4 -2
View File
@@ -31,7 +31,8 @@ if (! (isset($co['co_id']) && $co['co_id']))
$g5['title'] = $co['co_subject'];
if ($co['co_include_head'] && is_include_path_check($co['co_include_head']))
if ($co['co_include_head'] && is_include_path_check($co['co_include_head'])
&& (!function_exists('is_content_include_allowed') || is_content_include_allowed($co['co_include_head'])))
@include_once($co['co_include_head']);
else
include_once('./_head.php');
@@ -99,7 +100,8 @@ if(is_file($skin_file)) {
echo '<p>'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.</p>';
}
if ($co['co_include_tail'] && is_include_path_check($co['co_include_tail']))
if ($co['co_include_tail'] && is_include_path_check($co['co_include_tail'])
&& (!function_exists('is_content_include_allowed') || is_content_include_allowed($co['co_include_tail'])))
@include_once($co['co_include_tail']);
else
include_once('./_tail.php');