pht 파일 업로드 취약점 수정 adm1nkyj(김용진, http://adm1nkyj.kr) 님 제보

This commit is contained in:
thisgun
2017-12-08 11:27:37 +09:00
parent 82279c376b
commit 66358414f2
3 changed files with 3 additions and 3 deletions

View File

@ -524,7 +524,7 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
$upload[$i]['filesize'] = $filesize;
// 아래의 문자열이 들어간 파일은 -x 를 붙여서 웹경로를 알더라도 실행을 하지 못하도록 함
$filename = preg_replace("/\.(php|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
$filename = preg_replace("/\.(php|pht|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
shuffle($chars_array);
$shuffle = implode('', $chars_array);