[security] 관리자 영역 권한 검증 누락 및 CSRF 토큰 누락 수정
- adm/qa_config_update.php / adm/contentformupdate.php : qa_include_head/tail, co_include_head/tail 가 super 가드 없이 변경 가능해 하위 관리자가 임의 PHP 경로를 include 시킬 수 있던 LFI 위험을 board_form_update.php 와 동일한 패턴(super 외에는 기존 값 유지)으로 차단. - adm/member_form_update.php / adm/member_list_update.php : 신규 회원 생성·일괄 수정 시 부여하려는 mb_level 상한 검증이 없어 하위 관리자가 자기보다 높은 등급을 부여할 수 있던 권한 상승을 차단. - adm/shop_admin/categorylistupdate.php / adm/shop_admin/itemformupdate.php : is_include_path_check 호출에서 두 번째 인자(is_input=1) 누락으로 rar/php/zip wrapper 등 경로 wrapper 차단이 동작하지 않던 부분을 is_include_path_check($file, 1) 로 강화. - adm/shop_admin/orderdeliveryupdate.php / adm/shop_admin/orderpartcancelupdate.php / adm/sendmail_test.php : 상태 변경 동작에 check_admin_token() 누락으로 발생하던 CSRF 위험을 토큰 검증 추가로 차단. sendmail_test 폼에는 hidden token 필드 추가. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d5619707bc
commit
f4f8c57a74
9 files changed
+35
-2
No files matched your search
@@ -21,6 +21,12 @@ foreach ($check_keys as $key) {
|
||||
$qa_include_head = isset($qa_include_head) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($qa_include_head, 0, 255)) : '';
|
||||
$qa_include_tail = isset($qa_include_tail) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($qa_include_tail, 0, 255)) : '';
|
||||
|
||||
// 최고 관리자가 아니면 include 경로 변경 불가 (board_form_update.php 와 동일 정책)
|
||||
if ($is_admin !== 'super') {
|
||||
$qa_include_head = isset($qaconfig['qa_include_head']) ? $qaconfig['qa_include_head'] : '';
|
||||
$qa_include_tail = isset($qaconfig['qa_include_tail']) ? $qaconfig['qa_include_tail'] : '';
|
||||
}
|
||||
|
||||
// 관리자가 자동등록방지를 사용해야 할 경우
|
||||
if ($board && ($qaconfig['qa_include_head'] !== $qa_include_head || $qaconfig['qa_include_tail'] !== $qa_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()) {
|
||||
include_once G5_CAPTCHA_PATH . '/captcha.lib.php';
|
||||
|
||||
Reference in new issue
Block a user