ibatis 관련 취약점 진단사항 이행
This commit is contained in:
@@ -24,7 +24,6 @@ function init(url){
|
|||||||
dataType:"json",
|
dataType:"json",
|
||||||
data:{cmd: 'LIST_INIT_COMBO'},
|
data:{cmd: 'LIST_INIT_COMBO'},
|
||||||
success:function(json){
|
success:function(json){
|
||||||
debugger;
|
|
||||||
//new makeOptions("CODE","NAME").setObj($("select[name=flovrSevrName]")).setNoValueInclude(true).setNoValue(' ','전체').setData(json.serverRows).rendering();
|
//new makeOptions("CODE","NAME").setObj($("select[name=flovrSevrName]")).setNoValueInclude(true).setNoValue(' ','전체').setData(json.serverRows).rendering();
|
||||||
new makeOptions("CODE","NAME").setObj($("select[name=flovrSevrName]")).setData(json.serverRows).rendering();
|
new makeOptions("CODE","NAME").setObj($("select[name=flovrSevrName]")).setData(json.serverRows).rendering();
|
||||||
detail(url);
|
detail(url);
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
success : function(json) {
|
success : function(json) {
|
||||||
var data = json;
|
var data = json;
|
||||||
var detail = json.detail;
|
var detail = json.detail;
|
||||||
debugger;
|
|
||||||
// $("select[name=workGrpCd]").attr("disabled",true);
|
// $("select[name=workGrpCd]").attr("disabled",true);
|
||||||
// $("select[name=sndRcvKind]").attr("disabled",true);
|
// $("select[name=sndRcvKind]").attr("disabled",true);
|
||||||
// $("select[name=adptrKind]").attr("disabled",true);
|
// $("select[name=adptrKind]").attr("disabled",true);
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ $(document).ready(function() {
|
|||||||
var holdyYmd ="${param.holdyYmd}";
|
var holdyYmd ="${param.holdyYmd}";
|
||||||
var holdyDstcd ="${param.holdyDstcd}";
|
var holdyDstcd ="${param.holdyDstcd}";
|
||||||
var evntSchdrHoldyCtnt ="${param.evntSchdrHoldyCtnt}";
|
var evntSchdrHoldyCtnt ="${param.evntSchdrHoldyCtnt}";
|
||||||
debugger;
|
|
||||||
if (holdyYmd != "" && holdyYmd !="null"){
|
if (holdyYmd != "" && holdyYmd !="null"){
|
||||||
isDetail = true;
|
isDetail = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
|
import org.springframework.dao.DataIntegrityViolationException;
|
||||||
import org.springframework.dao.DuplicateKeyException;
|
import org.springframework.dao.DuplicateKeyException;
|
||||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
@@ -33,6 +34,16 @@ public class GlobalExceptionController {
|
|||||||
.map(SQLException::getMessage)
|
.map(SQLException::getMessage)
|
||||||
.orElse("");
|
.orElse("");
|
||||||
errMsg = errMsg + "중복 KEY 에러발생.\n자세한 사항은 관리자에게 문의바랍니다. ";
|
errMsg = errMsg + "중복 KEY 에러발생.\n자세한 사항은 관리자에게 문의바랍니다. ";
|
||||||
|
} else if (e instanceof DataIntegrityViolationException) {
|
||||||
|
errMsg = "입력값이 올바르지 않습니다. 필수 항목을 확인해주세요.";
|
||||||
|
} else if (e instanceof DataAccessException) {
|
||||||
|
errMsg = "데이터베이스 처리 중 오류가 발생했습니다.";
|
||||||
|
} else if (e instanceof SQLException) {
|
||||||
|
errMsg = "데이터베이스 처리 중 오류가 발생했습니다.";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (errMsg != null && (errMsg.contains("NestedSQLException") || errMsg.contains("nested exception"))) {
|
||||||
|
errMsg = "데이터베이스 처리 중 오류가 발생했습니다.";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.getServletPath().endsWith(".json")) {
|
if (request.getServletPath().endsWith(".json")) {
|
||||||
@@ -46,20 +57,21 @@ public class GlobalExceptionController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExceptionHandler(RuntimeException.class)
|
// 26.02.10 - 웹취약점 관련(시스템 운영정보 노출, Exception 과 보다 먼저 처리되어 필요성이 없는듯하여 주석으로 삭제 처리
|
||||||
public ModelAndView handleBizException(Exception e, HttpServletRequest request, HttpServletResponse response) {
|
// @ExceptionHandler(RuntimeException.class)
|
||||||
logger.error("GlobalExceptionController] handleBizException ", e);
|
// public ModelAndView handleBizException(Exception e, HttpServletRequest request, HttpServletResponse response) {
|
||||||
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
|
// logger.error("GlobalExceptionController] handleBizException ", e);
|
||||||
|
// response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
|
||||||
if (request.getServletPath().endsWith(".json")) {
|
//
|
||||||
HashMap resultMap = new HashMap();
|
// if (request.getServletPath().endsWith(".json")) {
|
||||||
resultMap.put("status", "fail");
|
// HashMap resultMap = new HashMap();
|
||||||
resultMap.put("errorMsg", e.getMessage());
|
// resultMap.put("status", "fail");
|
||||||
ModelAndView modelAndView = new ModelAndView("jsonView", resultMap);
|
// resultMap.put("errorMsg", e.getMessage());
|
||||||
return modelAndView;
|
// ModelAndView modelAndView = new ModelAndView("jsonView", resultMap);
|
||||||
} else {
|
// return modelAndView;
|
||||||
return null;
|
// } else {
|
||||||
}
|
// return null;
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user