영카트 Stored XSS 취약점 및 파일 업로드 취약점 (KVE-2018-0215, 2018-0342) 수정

This commit is contained in:
thisgun
2018-04-20 11:50:56 +09:00
parent 4ad1bb176c
commit 74c59452b7
3 changed files with 13 additions and 2 deletions

View File

@ -29,6 +29,17 @@ if($_POST['cz_type'] && !$_POST['cz_point'])
if(!$_POST['cz_period'])
alert('쿠폰사용기한을 입력해 주십시오.');
if( isset($_FILES['cp_img']) && !empty($_FILES['cp_img']['name']) ){
if( !preg_match('/\.(gif|jpe?g|bmp|png)$/i', $_FILES['cp_img']['name']) ){
alert("이미지 파일만 업로드 할수 있습니다.");
}
$timg = @getimagesize($_FILES['cp_img']['tmp_name']);
if ($timg['2'] < 1 || $timg['2'] > 16){
alert("이미지 파일만 업로드 할수 있습니다.");
}
}
if($_POST['cp_method'] == 0 && !$_POST['cp_target'])
alert('적용상품을 입력해 주십시오.');