HTML markup fixed in DefaultLoginPageGeneratingFilter
Ending div moved out of condition. Fixes: gh-6417
This commit is contained in:
parent
c82440ee82
commit
ffe602fdbe
|
@ -79,6 +79,7 @@ public class DefaultLoginPageConfigurerTests extends BaseSpringSpec {
|
||||||
<input name="${csrfToken.parameterName}" type="hidden" value="${csrfToken.token}" />
|
<input name="${csrfToken.parameterName}" type="hidden" value="${csrfToken.token}" />
|
||||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
</body></html>"""
|
</body></html>"""
|
||||||
when: "fail to log in"
|
when: "fail to log in"
|
||||||
super.setup()
|
super.setup()
|
||||||
|
@ -121,6 +122,7 @@ public class DefaultLoginPageConfigurerTests extends BaseSpringSpec {
|
||||||
<input name="${csrfToken.parameterName}" type="hidden" value="${csrfToken.token}" />
|
<input name="${csrfToken.parameterName}" type="hidden" value="${csrfToken.token}" />
|
||||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
</body></html>"""
|
</body></html>"""
|
||||||
when: "login success"
|
when: "login success"
|
||||||
super.setup()
|
super.setup()
|
||||||
|
@ -168,6 +170,7 @@ public class DefaultLoginPageConfigurerTests extends BaseSpringSpec {
|
||||||
<input name="${csrfToken.parameterName}" type="hidden" value="${csrfToken.token}" />
|
<input name="${csrfToken.parameterName}" type="hidden" value="${csrfToken.token}" />
|
||||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
</body></html>"""
|
</body></html>"""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,6 +275,7 @@ public class DefaultLoginPageConfigurerTests extends BaseSpringSpec {
|
||||||
<input name="${csrfToken.parameterName}" type="hidden" value="${csrfToken.token}" />
|
<input name="${csrfToken.parameterName}" type="hidden" value="${csrfToken.token}" />
|
||||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
</body></html>"""
|
</body></html>"""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,6 +322,7 @@ public class DefaultLoginPageConfigurerTests extends BaseSpringSpec {
|
||||||
<input name="${csrfToken.parameterName}" type="hidden" value="${csrfToken.token}" />
|
<input name="${csrfToken.parameterName}" type="hidden" value="${csrfToken.token}" />
|
||||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
</body></html>"""
|
</body></html>"""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -377,6 +382,7 @@ public class DefaultLoginPageConfigurerTests extends BaseSpringSpec {
|
||||||
<input name="${csrfToken.parameterName}" type="hidden" value="${csrfToken.token}" />
|
<input name="${csrfToken.parameterName}" type="hidden" value="${csrfToken.token}" />
|
||||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
</body></html>"""
|
</body></html>"""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,7 @@ public class FormLoginBeanDefinitionParserTests {
|
||||||
+ " </p>\n"
|
+ " </p>\n"
|
||||||
+ " <button class=\"btn btn-lg btn-primary btn-block\" type=\"submit\">Sign in</button>\n"
|
+ " <button class=\"btn btn-lg btn-primary btn-block\" type=\"submit\">Sign in</button>\n"
|
||||||
+ " </form>\n"
|
+ " </form>\n"
|
||||||
|
+ "</div>\n"
|
||||||
+ "</body></html>";
|
+ "</body></html>";
|
||||||
|
|
||||||
this.mvc.perform(get("/login")).andExpect(content().string(expectedContent));
|
this.mvc.perform(get("/login")).andExpect(content().string(expectedContent));
|
||||||
|
@ -126,6 +127,7 @@ public class FormLoginBeanDefinitionParserTests {
|
||||||
+ " </p>\n"
|
+ " </p>\n"
|
||||||
+ " <button class=\"btn btn-lg btn-primary btn-block\" type=\"submit\">Sign in</button>\n"
|
+ " <button class=\"btn btn-lg btn-primary btn-block\" type=\"submit\">Sign in</button>\n"
|
||||||
+ " </form>\n"
|
+ " </form>\n"
|
||||||
|
+ "</div>\n"
|
||||||
+ "</body></html>";
|
+ "</body></html>";
|
||||||
|
|
||||||
this.mvc.perform(get("/login")).andExpect(content().string(expectedContent));
|
this.mvc.perform(get("/login")).andExpect(content().string(expectedContent));
|
||||||
|
@ -171,6 +173,7 @@ public class FormLoginBeanDefinitionParserTests {
|
||||||
+ " </p>\n"
|
+ " </p>\n"
|
||||||
+ " <button class=\"btn btn-lg btn-primary btn-block\" type=\"submit\">Sign in</button>\n"
|
+ " <button class=\"btn btn-lg btn-primary btn-block\" type=\"submit\">Sign in</button>\n"
|
||||||
+ " </form>\n"
|
+ " </form>\n"
|
||||||
|
+ "</div>\n"
|
||||||
+ "</body></html>";
|
+ "</body></html>";
|
||||||
|
|
||||||
this.mvc.perform(get("/login")).andExpect(content().string(expectedContent));
|
this.mvc.perform(get("/login")).andExpect(content().string(expectedContent));
|
||||||
|
@ -214,6 +217,7 @@ public class FormLoginBeanDefinitionParserTests {
|
||||||
+ " </p>\n"
|
+ " </p>\n"
|
||||||
+ " <button class=\"btn btn-lg btn-primary btn-block\" type=\"submit\">Sign in</button>\n"
|
+ " <button class=\"btn btn-lg btn-primary btn-block\" type=\"submit\">Sign in</button>\n"
|
||||||
+ " </form>\n"
|
+ " </form>\n"
|
||||||
|
+ "</div>\n"
|
||||||
+ "</body></html>";
|
+ "</body></html>";
|
||||||
|
|
||||||
this.mvc.perform(get("/login")).andExpect(content().string(expectedContent));
|
this.mvc.perform(get("/login")).andExpect(content().string(expectedContent));
|
||||||
|
|
|
@ -285,9 +285,9 @@ public class DefaultLoginPageGeneratingFilter extends GenericFilterBean {
|
||||||
sb.append("</a>");
|
sb.append("</a>");
|
||||||
sb.append("</td></tr>\n");
|
sb.append("</td></tr>\n");
|
||||||
}
|
}
|
||||||
sb.append("</table></div>\n");
|
sb.append("</table>\n");
|
||||||
}
|
}
|
||||||
|
sb.append("</div>\n");
|
||||||
sb.append("</body></html>");
|
sb.append("</body></html>");
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|
Loading…
Reference in New Issue