github에서 보안이슈로 권고한 jackson json library 버전 수정 및 잡다한 내용 수정
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -37,7 +37,7 @@
|
||||
<log4jdbc.version>1.16</log4jdbc.version>
|
||||
|
||||
<!-- Jackson Json Version -->
|
||||
<jackson.version>2.5.1</jackson.version>
|
||||
<jackson.version>2.9.7</jackson.version>
|
||||
<!-- jackson.version>1.9.13</jackson.version -->
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
@@ -66,31 +66,34 @@ public class XplatformReflectionUtils {
|
||||
calendar.set(Calendar.DAY_OF_MONTH, Integer.parseInt(day, 10));
|
||||
|
||||
} else { // DataTypes.DATE 타입에 8자리 숫자가 들어와야 하는데 그러지 않은 것이므로 예외처리 대상이다
|
||||
|
||||
throw new IllegalArgumentException("dataType must be 8 characters in Xplatform DATE type");
|
||||
}
|
||||
} else if(dataType == DataTypes.TIME) {
|
||||
if(columnValue.length() > 6) {
|
||||
if(columnValue.length() >= 6) {
|
||||
String hour = columnValue.substring(0, 2);
|
||||
String minute = columnValue.substring(2, 4);
|
||||
String second = columnValue.substring(4, 6);
|
||||
String milisecond = columnValue.substring(6, 9);
|
||||
|
||||
calendar.set(Calendar.HOUR_OF_DAY, Integer.parseInt(hour, 10));
|
||||
calendar.set(Calendar.MINUTE, Integer.parseInt(minute, 10));
|
||||
calendar.set(Calendar.SECOND, Integer.parseInt(second, 10));
|
||||
calendar.set(Calendar.MILLISECOND, Integer.parseInt(milisecond, 10));
|
||||
} else { // DataTypes.DATE 타입에 6자리 이상의 숫자가 들어와야 하는데 그러지 않은 것이므로 예외처리 대상이다
|
||||
|
||||
if(columnValue.length() > 6) {
|
||||
String milisecond = columnValue.substring(6);
|
||||
calendar.set(Calendar.MILLISECOND, Integer.parseInt(milisecond, 10));
|
||||
}
|
||||
|
||||
} else { // DataTypes.DATE 타입에 6자리 이상의 숫자가 들어와야 하는데 그러지 않은 것이므로 예외처리 대상이다
|
||||
throw new IllegalArgumentException("dataType must be 6 characters in Xplatform TIME type");
|
||||
}
|
||||
} else if(dataType == DataTypes.DATE_TIME) {
|
||||
if(columnValue.length() == 17) {
|
||||
if(columnValue.length() >= 14) {
|
||||
String year = columnValue.substring(0, 4);
|
||||
String month = columnValue.substring(4, 6);
|
||||
String day = columnValue.substring(6, 8);
|
||||
String hour = columnValue.substring(8, 10);
|
||||
String minute = columnValue.substring(10, 12);
|
||||
String second = columnValue.substring(12, 14);
|
||||
String milisecond = columnValue.substring(14);
|
||||
|
||||
calendar.set(Calendar.YEAR, Integer.parseInt(year, 10));
|
||||
calendar.set(Calendar.MONTH, Integer.parseInt(month, 10) - 1);
|
||||
@@ -98,10 +101,14 @@ public class XplatformReflectionUtils {
|
||||
calendar.set(Calendar.HOUR_OF_DAY, Integer.parseInt(hour, 10));
|
||||
calendar.set(Calendar.MINUTE, Integer.parseInt(minute, 10));
|
||||
calendar.set(Calendar.SECOND, Integer.parseInt(second, 10));
|
||||
|
||||
if(columnValue.length() > 14) {
|
||||
String milisecond = columnValue.substring(14);
|
||||
calendar.set(Calendar.MILLISECOND, Integer.parseInt(milisecond, 10));
|
||||
}
|
||||
|
||||
} else { // DataTypes.DATE 타입에 14자리 이상의 숫자가 들어와야 하는데 그러지 않은 것이므로 예외처리 대상이다
|
||||
|
||||
throw new IllegalArgumentException("dataType must be 14 charactersin Xplatform DATE_TIME type");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -82,9 +82,7 @@ public class XplatformArgumentResolver implements HandlerMethodArgumentResolver
|
||||
|
||||
Class<?> type = parameter.getParameterType();
|
||||
Annotation[] annotations = parameter.getParameterAnnotations();
|
||||
HttpServletRequest request = (HttpServletRequest)webRequest.getNativeRequest();
|
||||
// HttpServletRequest request = webRequest.getNativeRequest(HttpServletRequest.class);
|
||||
// PlatformRequest platformRequest = new HttpPlatformRequest(request, "utf-8");
|
||||
HttpServletRequest request = webRequest.getNativeRequest(HttpServletRequest.class);
|
||||
|
||||
DataSetList dataSetList = null;
|
||||
VariableList variableList = null;
|
||||
@@ -112,16 +110,16 @@ public class XplatformArgumentResolver implements HandlerMethodArgumentResolver
|
||||
for(Annotation annotation : annotations){
|
||||
Class<? extends Annotation> annotationClass = annotation.annotationType();
|
||||
|
||||
if(annotationClass.equals(RequestDataSetList.class)){ // @RequestDataSetList 어노테이션에 대한 처리(이 어노테이션은 DataSetList 클래스객체만 파라미터 타입으로 받을 수 있다)
|
||||
if(annotationClass.equals(RequestDataSetList.class)) { // @RequestDataSetList 어노테이션에 대한 처리(이 어노테이션은 DataSetList 클래스객체만 파라미터 타입으로 받을 수 있다)
|
||||
if(type.equals(DataSetList.class)) {
|
||||
result = dataSetList;
|
||||
}else{
|
||||
result = WebArgumentResolver.UNRESOLVED;
|
||||
}
|
||||
} else if(annotationClass.equals(RequestDataSet.class)){ // @RequestDataSet 어노테이션에 대한 처리
|
||||
} else if(annotationClass.equals(RequestDataSet.class)) { // @RequestDataSet 어노테이션에 대한 처리
|
||||
RequestDataSet requestDataSet = (RequestDataSet)annotation;
|
||||
String dataSetName = requestDataSet.name();
|
||||
if(!StringUtils.hasText(dataSetName)) { // DataSet 이름이 빠진것이므로 이거는 예외처리 진행하자
|
||||
if(!StringUtils.hasText(dataSetName)) { // DataSet 이름이 빠진경우
|
||||
result = WebArgumentResolver.UNRESOLVED;
|
||||
} else {
|
||||
DataSet dataSet = dataSetList.get(dataSetName);
|
||||
@@ -180,7 +178,7 @@ public class XplatformArgumentResolver implements HandlerMethodArgumentResolver
|
||||
} else {
|
||||
result = variable.getObject();
|
||||
}
|
||||
} else { // 특정 변수 이름이 없으면 VO로 매핑하는 것이기 때문에 오히려 이런 경우 자바의 데이터타입과는 매핑을 할 수 없다
|
||||
} else { // 특정 변수 이름이 없으면 List, Set, Map 또는 VO로 매핑하는 것이기 때문에 오히려 이런 경우 자바의 데이터타입과는 매핑을 할 수 없다
|
||||
List<String> keyList = variableList.keyList();
|
||||
|
||||
if(Collection.class.isAssignableFrom(type)) {
|
||||
@@ -221,6 +219,7 @@ public class XplatformArgumentResolver implements HandlerMethodArgumentResolver
|
||||
|
||||
for(String key : keyList) {
|
||||
Field keyField = ReflectionUtils.findField(type, key);
|
||||
if(keyField == null) continue;
|
||||
ReflectionUtils.makeAccessible(keyField);
|
||||
|
||||
Class<?> keyFieldType = keyField.getType();
|
||||
|
||||
@@ -18,6 +18,4 @@ public class XplatformViewResolver extends AbstractTemplateViewResolver {
|
||||
return view;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
<targetPlatform>Windows,CE,Linux</targetPlatform>
|
||||
</customer>
|
||||
<date>
|
||||
<activation>2018-08-01</activation>
|
||||
<activation>2018-10-01</activation>
|
||||
<term unit="month">2</term>
|
||||
</date>
|
||||
<key>RDUTZJQZYZVS42PMV7NP4WGXE53J4VWM9</key>
|
||||
<key>X9SNZZ4F8D2WSUDUCFFWVYPQCBYA4NXH7</key>
|
||||
</license>
|
||||
Reference in New Issue
Block a user