이클립스 + java UserLib + java Build Path 등록 후 publish/export dependency 가 널인경우 /WEB-INF/lib 추가하기
1. 프로젝트 선택
필터 --> .resuorce 체크 풀기
.classpath 열어 아래 항목 추가
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/etcs"/>
----> 변경
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/etcs">
<attributes>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
2020년 1월 29일 수요일
2019년 12월 12일 목요일
자바시큐리티 보안취약점 점검 : Private 배열에 Public 데이터 할당
. 자바시큐리티 보안취약점 점검 :
1. Private 배열에 Public 데이터 할당
1. Private 배열에 Public 데이터 할당
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
private List<String> noTest = null;
public void setNoSessionUrls(List<String> aTest){
this.noTest = aTest;
}
아래의 형태로 변경
public void setNoSessionUrls(List<String> aTest){
// Private배열에 Public데이터 할당
// this.noTest = aTest;
this.noTest = new ArrayList<String>();
this.noTest .addAll(aTest);
}
| cs |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
private char[] aTest; String[] 등도
public Test(char[] bTest) {
this.aTest= bTest;
}
아래로 변경
public Test(char[] bTest) {
// Private배열에 Public데이터 할당
// this.aTest= bTest;
this.aTest= new char[bTest.length];
for(int i=0; i<bTest.length; i++){
this.aTest[i] = bTest[i];
}
}
| cs |
피드 구독하기:
글 (Atom)