[KVE-2026-0876] 모바일 상품 리스트 sort 파라미터 Blind SQL Injection 수정
This commit is contained in:
1 parent
8be4476f56
commit
a781b4aef3
2 files changed
+5
-1
No files matched your search
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
|
||||
if (isset($_REQUEST['sort'])) {
|
||||
// SQL 주석 토큰 차단 추가 — 데스크톱 shop/_common.php 와 동일 패턴
|
||||
if (isset($_REQUEST['sort']) && !preg_match("/(--|#|\/\*|\*\/)/", $_REQUEST['sort'])) {
|
||||
$sort = trim($_REQUEST['sort']);
|
||||
$sort = preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\s]/", "", $sort);
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
// 상품 정렬 컬럼 화이트리스트 — 데스크톱 shop/listtype.php 와 동일 패턴
|
||||
$sort = (isset($_REQUEST['sort']) && in_array($_REQUEST['sort'], array('it_name', 'it_sum_qty', 'it_price', 'it_use_avg', 'it_use_cnt', 'it_update_time'))) ? $_REQUEST['sort'] : '';
|
||||
|
||||
$type = isset($_REQUEST['type']) ? (int) preg_replace("/[^0-9]/", "", $_REQUEST['type']) : 1;
|
||||
if ($type === 1) $g5['title'] = '히트상품';
|
||||
else if ($type === 2) $g5['title'] = '추천상품';
|
||||
|
||||
Reference in new issue
Block a user