Merge branch 'master' of http://alfk8281@vcs.iten.co.kr:9999/hylee/mjon_git
@1bd29db361e33015b17be4ba2943d1afc7a914b3
--- src/main/java/itn/com/cmm/interceptor/IPIgnoreInterceptorHandler.java
+++ src/main/java/itn/com/cmm/interceptor/IPIgnoreInterceptorHandler.java
... | ... | @@ -13,6 +13,8 @@ |
| 13 | 13 |
import org.springframework.web.servlet.ModelAndView; |
| 14 | 14 |
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; |
| 15 | 15 |
|
| 16 |
+import com.google.common.net.InetAddresses; |
|
| 17 |
+ |
|
| 16 | 18 |
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; |
| 17 | 19 |
import itn.com.cmm.LoginVO; |
| 18 | 20 |
import itn.com.uss.olh.hpc.service.HackIpService; |
... | ... | @@ -84,6 +86,28 @@ |
| 84 | 86 |
|
| 85 | 87 |
HackIpVO hackIpVO = new HackIpVO(); |
| 86 | 88 |
hackIpVO.setIgnoreIp(userIP); |
| 89 |
+ |
|
| 90 |
+ /* |
|
| 91 |
+ * 헤더 아이피 체크 해주기 |
|
| 92 |
+ * "." 기준으로 문자열 분할 후 0 ~ 255 사이 값인지 체크 |
|
| 93 |
+ * 범위 값이 아닌경우 오류 처리 |
|
| 94 |
+ * |
|
| 95 |
+ * */ |
|
| 96 |
+ |
|
| 97 |
+ boolean ipCheckType = false; |
|
| 98 |
+ //IPv4, IPv6 모두 체크 해줌 |
|
| 99 |
+ if(InetAddresses.isInetAddress(userIP)) {
|
|
| 100 |
+ ipCheckType = true; |
|
| 101 |
+ } |
|
| 102 |
+ |
|
| 103 |
+ if(!ipCheckType) {
|
|
| 104 |
+ |
|
| 105 |
+ System.out.println("IPIgnoreInterceptorHandler-preHandle Header IP Check ERROR !!! ");
|
|
| 106 |
+ System.out.println("userIP ::: "+userIP);
|
|
| 107 |
+ response.sendRedirect(request.getContextPath() + "/"); |
|
| 108 |
+ return true; |
|
| 109 |
+ |
|
| 110 |
+ } |
|
| 87 | 111 |
|
| 88 | 112 |
int i_ignoreCnt = hackIpService.selectIgnoreIpCnt(hackIpVO); |
| 89 | 113 |
|
... | ... | @@ -151,7 +175,11 @@ |
| 151 | 175 |
loginLogService.logInsertLoginLog4Ajax(loginLog); |
| 152 | 176 |
|
| 153 | 177 |
}catch(Exception ex) {
|
| 154 |
- ex.printStackTrace(); |
|
| 178 |
+ //ex.printStackTrace(); |
|
| 179 |
+ System.out.println("IPIgnoreInterceptorHandler-preHandle Error !!! " + ex);
|
|
| 180 |
+ //오류가 발생하면 메일화면으로 이동 시킨다. |
|
| 181 |
+ response.sendRedirect(request.getContextPath() + "/"); |
|
| 182 |
+ return true; |
|
| 155 | 183 |
|
| 156 | 184 |
} |
| 157 | 185 |
} |
... | ... | @@ -163,11 +191,13 @@ |
| 163 | 191 |
|
| 164 | 192 |
|
| 165 | 193 |
}catch(Exception ex) {
|
| 166 |
- ex.printStackTrace(); |
|
| 194 |
+ //ex.printStackTrace(); |
|
| 195 |
+ System.out.println("IPIgnoreInterceptorHandler-preHandle Error !!! " + ex);
|
|
| 196 |
+ //오류가 발생하면 경로 오류를 발생 시킨다. |
|
| 197 |
+ response.sendRedirect(request.getContextPath() + "/"); |
|
| 198 |
+ return true; |
|
| 167 | 199 |
} |
| 168 | 200 |
|
| 169 |
- |
|
| 170 |
- |
|
| 171 | 201 |
return v_ret; |
| 172 | 202 |
} |
| 173 | 203 |
|
--- src/main/java/itn/let/mjo/pay/web/MjonPayV2Controller.java
+++ src/main/java/itn/let/mjo/pay/web/MjonPayV2Controller.java
... | ... | @@ -193,7 +193,7 @@ |
| 193 | 193 |
// |
| 194 | 194 |
|
| 195 | 195 |
/** |
| 196 |
- * KGM 카드결제 정보 Encode |
|
| 196 |
+ * KGM 간편결제 정보 Encode |
|
| 197 | 197 |
* @param MjonPayVO |
| 198 | 198 |
* @param modelAndView |
| 199 | 199 |
* @return /web/member/pay/kgmCardEncodeAjax.do |
... | ... | @@ -412,7 +412,7 @@ |
| 412 | 412 |
// SMS 체크 |
| 413 | 413 |
if (joinSettingVO != null && joinSettingVO.getSmsNoti().equals("Y")) {
|
| 414 | 414 |
// 스미싱의심 SMS 알림전송 |
| 415 |
- mjonNoticeSendUtil.smishingSmsNoticeSend("카드결제 데이터 위·변조 가능성 결제오류 처리", Userid, "");
|
|
| 415 |
+ mjonNoticeSendUtil.smishingSmsNoticeSend("간편결제 데이터 위·변조 가능성 결제오류 처리", Userid, "");
|
|
| 416 | 416 |
} |
| 417 | 417 |
|
| 418 | 418 |
// SLACK 체크 |
... | ... | @@ -506,7 +506,7 @@ |
| 506 | 506 |
mjonPayVO.setResultCode(Resultcd); |
| 507 | 507 |
mjonPayVO.setResultMsg(Resultmsg); |
| 508 | 508 |
mjonPayVO.setAmt(Prdtprice); // 결제금액 |
| 509 |
- mjonPayVO.setPayMethod("CARD"); // 결제방법
|
|
| 509 |
+ mjonPayVO.setPayMethod("SPAY"); // 결제방법
|
|
| 510 | 510 |
mjonPayVO.setPgCode("KGM"); //
|
| 511 | 511 |
mjonPayVO.setGoodsName(Prdtnm); // |
| 512 | 512 |
mjonPayVO.setPhone(""); // 모바일
|
... | ... | @@ -566,10 +566,10 @@ |
| 566 | 566 |
|
| 567 | 567 |
String rstMsg = ""; |
| 568 | 568 |
if("0000".equals(request.getParameter("Resultcd"))) {
|
| 569 |
- rstMsg = "카드결제가 정상적으로 완료되었습니다."; |
|
| 569 |
+ rstMsg = "간편결제가 정상적으로 완료되었습니다."; |
|
| 570 | 570 |
} |
| 571 | 571 |
else {
|
| 572 |
- rstMsg = "카드결제가 실패했습니다."; |
|
| 572 |
+ rstMsg = "간편결제가 실패했습니다."; |
|
| 573 | 573 |
} |
| 574 | 574 |
|
| 575 | 575 |
model.addAttribute("Resultcd", request.getParameter("Resultcd"));
|
... | ... | @@ -1464,24 +1464,31 @@ |
| 1464 | 1464 |
// Get Ip |
| 1465 | 1465 |
public static String getClientIP(HttpServletRequest request) {
|
| 1466 | 1466 |
String ip = request.getHeader("X-Forwarded-For");
|
| 1467 |
- |
|
| 1468 |
- if (ip == null) {
|
|
| 1467 |
+ String ipMethod = "X-Forwarded-For"; |
|
| 1468 |
+ |
|
| 1469 |
+ if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
|
| 1469 | 1470 |
ip = request.getHeader("Proxy-Client-IP");
|
| 1471 |
+ ipMethod = "Proxy-Client-IP"; |
|
| 1470 | 1472 |
} |
| 1471 |
- if (ip == null) {
|
|
| 1473 |
+ if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
|
| 1472 | 1474 |
ip = request.getHeader("WL-Proxy-Client-IP");
|
| 1475 |
+ ipMethod = "WL-Proxy-Client-IP"; |
|
| 1473 | 1476 |
} |
| 1474 |
- if (ip == null) {
|
|
| 1477 |
+ if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
|
| 1475 | 1478 |
ip = request.getHeader("HTTP_CLIENT_IP");
|
| 1479 |
+ ipMethod = "HTTP_CLIENT_IP"; |
|
| 1476 | 1480 |
} |
| 1477 |
- if (ip == null) {
|
|
| 1481 |
+ if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
|
| 1478 | 1482 |
ip = request.getHeader("HTTP_X_FORWARDED_FOR");
|
| 1483 |
+ ipMethod = "HTTP_X_FORWARDED_FOR"; |
|
| 1479 | 1484 |
} |
| 1480 |
- if (ip == null) {
|
|
| 1485 |
+ if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
|
| 1481 | 1486 |
ip = request.getRemoteAddr(); |
| 1487 |
+ ipMethod = "getRemoteAddr"; |
|
| 1482 | 1488 |
} |
| 1483 |
- |
|
| 1489 |
+ |
|
| 1484 | 1490 |
System.out.println("#############################################################");
|
| 1491 |
+ System.out.println("KG MOBILIANS NotiUrl - getClientIP : " + ipMethod);
|
|
| 1485 | 1492 |
System.out.println("KG MOBILIANS NotiUrl - getClientIP : " + ip);
|
| 1486 | 1493 |
|
| 1487 | 1494 |
return ip; |
--- src/main/webapp/WEB-INF/jsp/web/addr/AddrList.jsp
+++ src/main/webapp/WEB-INF/jsp/web/addr/AddrList.jsp
... | ... | @@ -106,6 +106,17 @@ |
| 106 | 106 |
//if(!confirm("주소록을 추가하시겠습니까?")) {
|
| 107 | 107 |
// return; |
| 108 | 108 |
//} |
| 109 |
+ |
|
| 110 |
+ if(!checkHpNum(form.addrPhoneNo.value)){//휴대폰 유효성 검사
|
|
| 111 |
+ if(!checkNorPhoneNum(form.addrPhoneNo.value)){//일반전화 유효성 검사
|
|
| 112 |
+ |
|
| 113 |
+ alert("잘못된 휴대폰번호 또는 일반전화 번호 입니다.");
|
|
| 114 |
+ return false; |
|
| 115 |
+ |
|
| 116 |
+ } |
|
| 117 |
+ |
|
| 118 |
+ } |
|
| 119 |
+ |
|
| 109 | 120 |
var data = new FormData(form); |
| 110 | 121 |
|
| 111 | 122 |
$.ajax({
|
--- src/main/webapp/WEB-INF/jsp/web/cop/kgmV2/cardOkUrl.jsp
+++ src/main/webapp/WEB-INF/jsp/web/cop/kgmV2/cardOkUrl.jsp
... | ... | @@ -56,7 +56,7 @@ |
| 56 | 56 |
<div class="layer_in" style="height: 330px; padding-top: 0px; !important;"> |
| 57 | 57 |
<div class="img_box"><img src="/publish/images/content/pay_complete_img.png" alt="" /></div> |
| 58 | 58 |
<div class="text_box"> |
| 59 |
- <div class="title">신용카드 결제</div> |
|
| 59 |
+ <div class="title">간편 결제</div> |
|
| 60 | 60 |
<p><c:out value='${Resultmsg}'/></p>
|
| 61 | 61 |
</div> |
| 62 | 62 |
<div class="popup_btn" style="margin: 30px auto 0 auto;"> |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?