Skip to content

Commit

Permalink
doc: added some todos
Browse files Browse the repository at this point in the history
  • Loading branch information
zyberzebra committed Mar 20, 2024
1 parent 11c57f0 commit 8a76221
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/example/demo1/CookieVaultServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

@WebServlet(name = "cookieVaultServlet", value = "/the-cookie-vault")
public class CookieVaultServlet extends HttpServlet {
//todo remove salt and make the secret "easier" to crack and add riddle for additional clam
public static final LocalDate CHEAP_SALT = LocalDate.now();
public static final Algorithm ALGORITHM = Algorithm.HMAC256("tomcat"+ CHEAP_SALT);
private String message;
Expand All @@ -24,7 +25,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) thro
// Hello
String jwt = JWT.create().withClaim("Secret", "Hello Hacker. This is your price.").sign(ALGORITHM);

PrintWriter out = response.getWriter();
PrintWriter out = response.getWriter(); //todo html
out.println("<html><body>");
out.println("<h1>" + message + "</h1>");
out.println("<div>"+ "you fond your JWT! "
Expand Down

0 comments on commit 8a76221

Please sign in to comment.