Skip to content

Commit b16c019

Browse files
committed
CSRF 처리.
1 parent d45e49d commit b16c019

22 files changed

+183
-42
lines changed

.idea/sonarIssues.xml

Lines changed: 110 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

development-project/project-standard/standard-server/src/main/java/egovframework/com/sec/ram/web/EgovAuthorManageController.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import egovframework.com.sec.ram.service.EgovAuthorManageService;
99

1010
import egovframework.rte.fdl.property.EgovPropertyService;
11+
import egovframework.rte.fdl.security.intercept.EgovReloadableFilterInvocationSecurityMetadataSource;
1112
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
1213

1314
import javax.annotation.Resource;
@@ -59,6 +60,9 @@ public class EgovAuthorManageController {
5960

6061
@Autowired
6162
private DefaultBeanValidator beanValidator;
63+
64+
@Resource(name="databaseSecurityMetadataSource")
65+
EgovReloadableFilterInvocationSecurityMetadataSource databaseSecurityMetadataSource;
6266

6367
/**
6468
* 권한 목록화면 이동
@@ -158,6 +162,7 @@ public String insertAuthor(@ModelAttribute("authorManage") AuthorManage authorMa
158162
} else {
159163
egovAuthorManageService.insertAuthor(authorManage);
160164
status.setComplete();
165+
databaseSecurityMetadataSource.reload();
161166
model.addAttribute("message", egovMessageSource.getMessage("success.common.insert"));
162167
return "forward:/sec/ram/EgovAuthor.do";
163168
}

development-project/project-standard/standard-server/src/main/java/egovframework/com/sec/ram/web/EgovAuthorRoleController.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
import org.springframework.web.bind.annotation.SessionAttributes;
2020
import org.springframework.web.bind.support.SessionStatus;
2121

22+
import egovframework.rte.fdl.security.intercept.EgovReloadableFilterInvocationSecurityMetadataSource;
23+
2224
/**
2325
* 권한별 롤관리에 관한 controller 클래스를 정의한다.
2426
* @author 공통서비스 개발팀 이문준
@@ -50,6 +52,9 @@ public class EgovAuthorRoleController {
5052
@Resource(name = "propertiesService")
5153
protected EgovPropertyService propertiesService;
5254

55+
@Resource(name="databaseSecurityMetadataSource")
56+
EgovReloadableFilterInvocationSecurityMetadataSource databaseSecurityMetadataSource;
57+
5358
/**
5459
* 권한 롤 관계 화면 이동
5560
* @return "egovframework/com/sec/ram/EgovDeptAuthorList"
@@ -128,6 +133,9 @@ public String insertAuthorRole(@RequestParam("authorCode") String authorCode,
128133
}
129134

130135
status.setComplete();
136+
137+
databaseSecurityMetadataSource.reload();
138+
131139
model.addAttribute("message", egovMessageSource.getMessage("success.common.insert"));
132140
return "forward:/sec/ram/EgovAuthorRoleList.do";
133141
}

development-project/project-standard/standard-server/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/bbs/EgovBBSListByTrget.jsp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
66
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
77
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
8+
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
89
<%
910
/**
1011
* @Class Name : EgovBBSListByTarget.jsp
@@ -63,7 +64,7 @@
6364
</head>
6465
<body>
6566

66-
<form name="frm" action ="" method="post">
67+
<form:form name="frm" action ="" method="post">
6768
<input type="hidden" name="bbsId" value="">
6869
<input type="hidden" name="trgetId" value="${trgetId}">
6970
<input type="hidden" name="param_bbsId" value="">
@@ -157,6 +158,6 @@
157158
</div>
158159
<input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/>
159160
</div>
160-
</form>
161+
</form:form>
161162
</body>
162163
</html>

development-project/project-standard/standard-server/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/bbs/EgovBBSLoneMstrList.jsp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
66
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
77
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
8+
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
89
<%
910
/**
1011
* @Class Name : EgovBBSLoneMstrList.jsp
@@ -61,7 +62,7 @@
6162
</head>
6263
<body>
6364

64-
<form name="frm" method="post" action="<c:url value='/cop/bbs/selectBoardMasterList.do'/>" >
65+
<form:form name="frm" method="post" action="<c:url value='/cop/bbs/selectBoardMasterList.do'/>" >
6566
<input type="hidden" name="bbsId">
6667
<input type="hidden" name="trgetId">
6768

@@ -150,6 +151,6 @@
150151
</div>
151152
<input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/>
152153
</div>
153-
</form>
154+
</form:form>
154155
</body>
155156
</html>

development-project/project-standard/standard-server/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/bbs/EgovBoardMstrList.jsp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
66
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
77
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
8+
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
89
<%
910
/**
1011
* @Class Name : EgovBoardMstrList.jsp
@@ -68,7 +69,7 @@
6869
</head>
6970
<body>
7071
<div id="border" style="width:730px">
71-
<form name="frm" action="<c:url value='/cop/bbs/SelectBBSMasterInfs.do'/>" method="post">
72+
<form:form name="frm" action="<c:url value='/cop/bbs/SelectBBSMasterInfs.do'/>" method="post">
7273
<input type="hidden" name="bbsId">
7374
<input type="hidden" name="trgetId">
7475

@@ -154,7 +155,7 @@
154155
<ui:pagination paginationInfo="${paginationInfo}" type="image" jsFunction="fn_egov_select_brdMstr" />
155156
</div>
156157
<input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/>
157-
</form>
158+
</form:form>
158159
</div>
159160

160161
</body>

development-project/project-standard/standard-server/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/bbs/EgovBoardMstrListPop.jsp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
66
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
77
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
8+
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
89
<%
910
/**
1011
* @Class Name : EgovBoardMstrListPop.jsp
@@ -55,7 +56,7 @@
5556

5657
</head>
5758
<body>
58-
<form name="frm" action ="" method="post">
59+
<form:form name="frm" action ="" method="post">
5960
<input type="hidden" name="bbsId" value="">
6061

6162
<table width="100%" cellpadding="8" class="table-search" border="0">
@@ -167,6 +168,6 @@
167168
</tr>
168169
</table>
169170
</div>
170-
</form>
171+
</form:form>
171172
</body>
172173
</html>

development-project/project-standard/standard-server/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/bbs/EgovNoticeInqire.jsp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
66
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
77
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
8+
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
89
<%
910
/**
1011
* @Class Name : EgovNoticeInqire.jsp
@@ -102,7 +103,7 @@
102103

103104
</head>
104105
<body onload="onloading();">
105-
<form name="frm" method="post" action="">
106+
<form:form name="frm" method="post" action="">
106107
<input type="hidden" name="pageIndex" value="<c:out value='${searchVO.pageIndex}'/>">
107108
<input type="hidden" name="bbsId" value="<c:out value='${result.bbsId}'/>" >
108109
<input type="hidden" name="nttId" value="<c:out value='${result.nttId}'/>" >
@@ -271,6 +272,6 @@
271272
</table>
272273
</div>
273274
</div>
274-
</form>
275+
</form:form>
275276
</body>
276277
</html>

development-project/project-standard/standard-server/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/bbs/EgovNoticeList.jsp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
77
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
88
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
9+
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
910
<c:set var="ImgUrl" value="/images/egovframework/com/cop/bbs/"/>
1011
<%
1112
/**
@@ -95,7 +96,7 @@
9596

9697
<div id="border">
9798

98-
<form name="frm" action ="<c:url value='/cop/bbs${prefix}/selectBoardList.do'/>" method="post">
99+
<form:form name="frm" action ="<c:url value='/cop/bbs${prefix}/selectBoardList.do'/>" method="post">
99100
<input type="hidden" name="bbsId" value="<c:out value='${boardVO.bbsId}'/>" />
100101
<input type="hidden" name="nttId" value="0" />
101102
<input type="hidden" name="bbsTyCode" value="<c:out value='${brdMstrVO.bbsTyCode}'/>" />
@@ -134,7 +135,7 @@
134135
</th>
135136
</tr>
136137
</table>
137-
</form>
138+
</form:form>
138139

139140
<table width="100%" cellpadding="8" class="listTable" summary="번호, 제목, 게시시작일, 게시종료일, 작성자, 작성일, 조회수 입니다">
140141
<thead>
@@ -155,10 +156,10 @@
155156
</thead>
156157

157158
<tbody>
158-
<form name="submitParam" method="post">
159+
<form:form name="submitParam" method="post">
159160
<input type="hidden" name="bbsId" />
160161
<input type="hidden" name="nttId" />
161-
</form>
162+
</form:form>
162163
<c:forEach var="result" items="${resultList}" varStatus="status">
163164
<tr>
164165
<!--td class="lt_text3" nowrap><input type="checkbox" name="check1" class="check2"></td-->
@@ -175,7 +176,7 @@
175176
<c:out value="${result.nttSj}" />
176177
</c:when>
177178
<c:otherwise>
178-
<form name="subForm" method="post" action="<c:url value='/cop/bbs${prefix}/selectBoardArticle.do'/>">
179+
<form:form name="subForm" method="post" action="<c:url value='/cop/bbs${prefix}/selectBoardArticle.do'/>">
179180
<input type="hidden" name="bbsTyCode" value="<c:out value='${brdMstrVO.bbsTyCode}'/>" />
180181
<input type="hidden" name="bbsAttrbCode" value="<c:out value='${brdMstrVO.bbsAttrbCode}'/>" />
181182
<input type="hidden" name="authFlag" value="<c:out value='${brdMstrVO.authFlag}'/>" />
@@ -189,7 +190,7 @@
189190
<span class="link">
190191
<a href="#" onclick="fn_egov_inqire_notice('${result.nttId}', '${result.bbsId }');"><c:out value="${result.nttSj}"/></a>
191192
</span>
192-
</form>
193+
</form:form>
193194
</c:otherwise>
194195
</c:choose>
195196
</td>

development-project/project-standard/standard-server/src/main/webapp/WEB-INF/jsp/egovframework/com/cop/cmy/EgovCmmntyInqire.jsp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
66
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
77
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
8+
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
89
<%
910
/**
1011
* @Class Name : EgovCmmntyInqire.jsp
@@ -49,7 +50,7 @@
4950

5051
</head>
5152
<body>
52-
<form name="frm" method="post" action="<c:url value='/cop/cmy/selectCmmntyInfs.do'/>">
53+
<form:form name="frm" method="post" action="<c:url value='/cop/cmy/selectCmmntyInfs.do'/>">
5354
<input name="pageIndex" type="hidden" value="<c:out value='${searchVO.pageIndex}'/>"/>
5455
<input name="cmmntyId" type="hidden" value="<c:out value='${cmmntyVO.cmmntyId}'/>"/>
5556
<input name="param_cmmntyId" type="hidden" />
@@ -147,6 +148,6 @@
147148
</table>
148149
</div>
149150
</div>
150-
</form>
151+
</form:form>
151152
</body>
152153
</html>

0 commit comments

Comments
 (0)