Skip to content

Commit 2dcb4d9

Browse files
committed
Refactoring
1 parent 95ba46b commit 2dcb4d9

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

Ch08_CSRF/src/main/java/de/dominikschadow/webappsecurity/servlets/ProtectedServlet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
112112
String newPassword = request.getParameter("newPassword");
113113
String confirmPassword = request.getParameter("confirmPassword");
114114

115-
LOGGER.info("Received {} and {} as GET parameter.", newPassword, confirmPassword);
115+
LOGGER.info("Received {} and {} as POST parameter.", newPassword, confirmPassword);
116116

117117
try (PrintWriter out = response.getWriter()) {
118118
out.println("<html>");

Ch08_CSRF/src/main/webapp/form-protected.jsp renamed to Ch08_CSRF/src/main/webapp/form-protected.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
2-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3-
<%@ page import="de.dominikschadow.webappsecurity.token.CSRFTokenHandler" %>
1+
<!DOCTYPE html>
42
<html lang="en">
53
<head>
64
<meta charset="UTF-8">

Ch08_CSRF/src/main/webapp/requests-protected.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h2>POST Requests</h2>
2121
<p>POST requests are a little bit harder to trigger and require JavaScript.</p>
2222

2323
<ul>
24-
<li><a href="form-protected.jsp">Hidden Form</a></li>
24+
<li><a href="form-protected.html">Hidden Form</a></li>
2525
<li><a href="form-working.jsp">Working Form</a></li>
2626
<li><a href="xmlhttprequest-protected.html">XMLHttpRequest</a></li>
2727
</ul>

0 commit comments

Comments
 (0)