웹취약점처리, 엔터키 소스 삭제
This commit is contained in:
parent
44f5b3a228
commit
63f7308014
@ -380,6 +380,7 @@ public class NlibSearchController extends NlibCommonController {
|
||||
) throws EgovBizException {
|
||||
String returnUrl = "";
|
||||
DataMap paramMap = DataMap.getParamMap(req);
|
||||
BufferedReader br = null;
|
||||
try {
|
||||
String originUrl = URLEncoder.encode(paramMap.getString("url"), "UTF-8");
|
||||
URL url = new URL( NlibProperty.getProperty("shorturl.api") + "&action=shorturl&format=xml&title=nculture&url=" + originUrl);
|
||||
@ -387,7 +388,6 @@ public class NlibSearchController extends NlibCommonController {
|
||||
con.setRequestMethod("GET");
|
||||
//con.setRequestProperty("Authorization", header);
|
||||
int responseCode = con.getResponseCode();
|
||||
BufferedReader br;
|
||||
if(responseCode==200) { // 정상 호출
|
||||
br = new BufferedReader(new InputStreamReader(con.getInputStream()));
|
||||
} else { // 에러 발생
|
||||
@ -399,7 +399,6 @@ public class NlibSearchController extends NlibCommonController {
|
||||
while ((inputLine = br.readLine()) != null) {
|
||||
response.append(inputLine);
|
||||
}
|
||||
br.close();
|
||||
|
||||
String str = response.toString();
|
||||
Pattern pattern = Pattern.compile("<shorturl>(.+?)</shorturl>");
|
||||
@ -413,6 +412,17 @@ public class NlibSearchController extends NlibCommonController {
|
||||
} catch (IOException e) {
|
||||
log.error("shorturl-data.do 단축url > Exception 발생 : " + e.toString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
if(br != null)br.close();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
log.error("shorturl-data.do 단축url > Exception 발생 : " + e.toString());
|
||||
}
|
||||
}
|
||||
return returnUrl;
|
||||
}
|
||||
/**
|
||||
|
||||
@ -419,12 +419,6 @@ function certMobileCheck(){
|
||||
})
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}, true);
|
||||
|
||||
function checkBirthday() {
|
||||
var birthday;
|
||||
var yy = $("#birth_yy option:selected").val();
|
||||
|
||||
@ -477,12 +477,6 @@ function fn_cancel(){
|
||||
location.href="/userInfo/getMyHome.do";
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}, true);
|
||||
|
||||
function checkBirthday() {
|
||||
var birthday;
|
||||
var yy = $("#birth_yy option:selected").val();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user