업로드 확장자 체크 보완

This commit is contained in:
KNKIM 2021-12-17 15:10:55 +09:00
parent 524ed3e1f6
commit 10d9673f3c

View File

@ -156,7 +156,7 @@ public class FileUploadController extends NlibCommonController {
// 허용 파일 확장자 // 허용 파일 확장자
String acceptableExtList = StringUtil.getString(NlibProperty.getString("fileupload.acceptable.ext"), null); String acceptableExtList = StringUtil.getString(NlibProperty.getString("fileupload.acceptable.ext"), null);
if(acceptableExtList != null) acceptableExtList = "," + acceptableExtList.trim(); if(acceptableExtList != null) acceptableExtList = "," + acceptableExtList.trim().toLowerCase();
boolean acceptableExt = false; boolean acceptableExt = false;
// 최대 파일크기 // 최대 파일크기
@ -189,7 +189,7 @@ public class FileUploadController extends NlibCommonController {
// 파일 확장자 // 파일 확장자
int index = orignlFileNm.lastIndexOf("."); int index = orignlFileNm.lastIndexOf(".");
String fileExt = (index < 1 ? "" : orignlFileNm.substring(index + 1)); String fileExt = (index < 1 ? "" : orignlFileNm.substring(index + 1)).toLowerCase();
if(acceptableExtList != null) { if(acceptableExtList != null) {