%-- Document : auth_broker Created on : 2011. 1. 13, 오전 11:24:42 Author : bhs --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page import="kr.co.kihyun.lang.MString"%> <%@page import="org.slf4j.Logger"%> <%@page import="org.slf4j.LoggerFactory"%> <% Logger LOG = LoggerFactory.getLogger(this.getClass()); String strPostData1 = request.getParameter("SESSIONKEY1"); String strPostData4 = request.getParameter("SESSIONVAL1"); String strPostData2 = request.getParameter("SESSIONKEY2"); String strPostData5 = request.getParameter("SESSIONVAL2"); String redircetUrl = request.getParameter("redirect_url"); String redircet = request.getParameter("redirect"); System.out.println("strPostData1 --- " + strPostData1); System.out.println("strPostData4 --- " + strPostData4); System.out.println("strPostData2 --- " + strPostData2); System.out.println("strPostData5 --- " + strPostData5); System.out.println("redircetUrl --- " + redircetUrl); System.out.println("redircet --- " + redircet); if (MString.isNull(strPostData1) || MString.isNull(strPostData4) || MString.isNull(strPostData2) || MString.isNull(strPostData5)) { System.out.println("is null ------------------------------ "); LOG.debug("SESSIONKEY1/SESSIONVAL1: {}/{}, SESSIONKEY2/SESSIONVAL2: {}/{}", new Object[] {strPostData1, strPostData4, strPostData2, strPostData5}); response.sendRedirect("/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?redirect=/auth_broker.jsp"); return; } System.out.println("is not null ------------------------------ "); Cookie cookie1 = null; Cookie cookie2 = null; //26.HTTP 응답분할(addCookie)_CWE-113 : Update by KWON,HAN -- 2014.12.12 사태로 원복함 cookie1 = new Cookie(strPostData1, strPostData4); // // 해더값이 두개로 나뉘어지는 것을 방지하기 위해 외부에서 입력되는 \n과 \r등을 제거한다. // String filtered_strPostData4 = strPostData4.replaceAll("\r", "").replaceAll("\n", ""); // // cookie1 = new Cookie(strPostData1, filtered_strPostData4); //====================================================================== cookie1.setPath("/"); cookie1.setDomain(request.getServerName().replace("ats", "")); response.addCookie(cookie1); //26.HTTP 응답분할(addCookie)_CWE-113 : Update by KWON,HAN -- 2014.12.12 사태로 원복함 cookie2 = new Cookie(strPostData2, strPostData5); // 해더값이 두개로 나뉘어지는 것을 방지하기 위해 외부에서 입력되는 \n과 \r등을 제거한다. // String filtered_strPostData5 = strPostData5.replaceAll("\r", "").replaceAll("\n", ""); // // cookie2 = new Cookie(strPostData1, filtered_strPostData5); //====================================================================== cookie2.setPath("/"); cookie2.setDomain(request.getServerName().replace("ats", "")); response.addCookie(cookie2); LOG.info("redirect url : {}", request.getParameter("redirect_url")); response.sendRedirect(request.getParameter("redirect_url")); %>