Use contextPath in One-Time-Token default submit UI
This commit is contained in:
committed by
Marcus Hert Da Coregio
parent
ef31ae1a98
commit
528d739a60
@@ -77,6 +77,15 @@ class DefaultOneTimeTokenSubmitPageGeneratingFilterTests {
|
||||
assertThat(response).contains("<form class=\"login-form\" action=\"/login/another\" method=\"post\">");
|
||||
}
|
||||
|
||||
@Test
|
||||
void setContextThenGenerates() throws Exception {
|
||||
this.request.setContextPath("/context");
|
||||
this.filter.setLoginProcessingUrl("/login/another");
|
||||
this.filter.doFilterInternal(this.request, this.response, this.filterChain);
|
||||
String response = this.response.getContentAsString();
|
||||
assertThat(response).contains("<form class=\"login-form\" action=\"/context/login/another\" method=\"post\">");
|
||||
}
|
||||
|
||||
@Test
|
||||
void filterWhenTokenQueryParamUsesSpecialCharactersThenValueIsEscaped() throws Exception {
|
||||
this.request.setParameter("token", "this<>!@#\"");
|
||||
|
||||
Reference in New Issue
Block a user