Re-enable csrf in booking-faces
This commit is contained in:
@@ -26,11 +26,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
.logoutUrl("/spring/logout")
|
||||
.logoutSuccessUrl("/spring/logoutSuccess")
|
||||
.and()
|
||||
|
||||
// Disable CSRF (won't work with JSF) but ensure last HTTP POST request is saved
|
||||
// See https://jira.springsource.org/browse/SEC-2498
|
||||
|
||||
.csrf().disable()
|
||||
.requestCache()
|
||||
.requestCache(new HttpSessionRequestCache());
|
||||
|
||||
|
||||
@@ -129,6 +129,9 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
|
||||
</div>
|
||||
<div>
|
||||
<p:commandButton id="proceed" action="proceed" value="Proceed" update="@form" />
|
||||
<p:commandButton id="cancel" value="Cancel" action="cancel" immediate="true" />
|
||||
|
||||
@@ -71,6 +71,9 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
|
||||
</div>
|
||||
<div>
|
||||
<p:commandButton id="confirm" value="Confirm" action="confirm"/> 
|
||||
<p:commandButton id="revise" value="Revise" action="revise"/> 
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
</h:panelGrid>
|
||||
<p:tooltip for="searchString" targetPosition="topRight" position="bottomLeft"
|
||||
value="Search hotels by name, address, city, or zip." style="cream" />
|
||||
</h:form>
|
||||
<div><input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/></div>
|
||||
</h:form>
|
||||
</p:panel>
|
||||
|
||||
<p:panel id="bookings" header="Your Hotel Bookings" rendered="#{currentUser!=null}" toggleable="true" toggleSpeed="100" style="margin-top: 10px">
|
||||
@@ -67,6 +68,7 @@
|
||||
</p:column>
|
||||
</p:dataTable>
|
||||
</p:outputPanel>
|
||||
<div><input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/></div>
|
||||
</h:form>
|
||||
</p:panel>
|
||||
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
<f:convertNumber type="currency" currencySymbol="$"/>
|
||||
</h:outputText>
|
||||
</div>
|
||||
<div>
|
||||
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
|
||||
</div>
|
||||
<div>
|
||||
<p:commandButton id="book" action="book" value="Book Hotel" ajax="false" />
|
||||
<p:commandButton id="cancel" action="cancel" value="Back to Search"/>
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
</p:commandButton>
|
||||
</p:column>
|
||||
</p:dataTable>
|
||||
<div><input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/></div>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
@@ -31,7 +31,11 @@
|
||||
<div>
|
||||
<h4 class="alt bottom">
|
||||
<c:if test="${not empty currentUser.name}">
|
||||
Welcome, ${currentUser.name} | <a href="${request.contextPath}/spring/logout">Logout</a>
|
||||
<form name="f" action="${request.contextPath}/spring/logout" method="post">
|
||||
<div><input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/></div>
|
||||
Welcome, ${currentUser.name}
|
||||
<input name="submit" type="submit" value="Logout" />
|
||||
</form>
|
||||
</c:if>
|
||||
<c:if test="${empty currentUser.name}">
|
||||
<a href="${request.contextPath}/spring/login">Login</a>
|
||||
|
||||
@@ -48,6 +48,9 @@
|
||||
<input type="checkbox" name="_spring_security_remember_me"/>
|
||||
Don't ask for my password for two weeks:
|
||||
</p>
|
||||
<div>
|
||||
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
|
||||
</div>
|
||||
<p>
|
||||
<input name="submit" type="submit" value="Login" />
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user