Commit 9f7d3f39 authored by Vetle.Hjelmtvedt's avatar Vetle.Hjelmtvedt
Browse files

Merge branch 'taskW' into 'master'

Task w

See merge request !8
parents 8bdd0a6e ea57e8c3
......@@ -97,8 +97,7 @@ public class Handler extends AbstractHandler
(request.getParameter("username"))).get());
String password = (new Maybe<String>
(request.getParameter("password"))).get();
System.err.println("Registering user: \"" + username
+ "\" with password \"" + password + "\"");
System.err.println("Registering user: \"" + username);
try {
Password pw = new Password(password);
......@@ -144,6 +143,10 @@ public class Handler extends AbstractHandler
// User is now logged in with a valid sesion.
// We set the session cookie to keep the user logged in:
response.addCookie(new Cookie("session",session.identity.toString()));
// Set X-Frame-Options header
response.setHeader("X-Frame-Options", "SAMEORIGIN");
// Set X-Content-Type-Options header
response.setHeader("X-Content-Type-Options", "nosniff");
final PrintWriter out = response.getWriter();
// Handle a logged in request.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment