You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.9 KiB
74 lines
2.9 KiB
<%-- |
|
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"); |
|
|
|
if (MString.isNull(strPostData1) || MString.isNull(strPostData4) |
|
|| MString.isNull(strPostData2) || MString.isNull(strPostData5)) { |
|
LOG.error("SESSIONKEY1/SESSIONVAL1: {}/{}, SESSIONKEY2/SESSIONVAL2: {}/{}", |
|
new Object[] {strPostData1, strPostData4, strPostData2, strPostData5}); |
|
response.sendRedirect("/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?redirect=/auth_broker.jsp"); |
|
return; |
|
} |
|
|
|
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")); |
|
%> |
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
|
"http://www.w3.org/TR/html4/loose.dtd"> |
|
|
|
<html> |
|
<head> |
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|
<title>Authentication Broker</title> |
|
</head> |
|
<body> |
|
<h1>Hello World!</h1> |
|
</body> |
|
</html>
|
|
|