In case the cookie validation fails, we need to be able to send an error
message which accesses current_user.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
k : self.decode_argument(v, name=k) for (k, v) in kwargs.items()
}
+ # Automatically log the user
+ self.current_user = await self.get_current_user()
+
# Check the XSRF cookie
if not self.request.method in ("GET", "HEAD", "OPTIONS"):
self.check_xsrf_cookie()
- # Automatically log the user
- self.current_user = await self.get_current_user()
-
# Prepare the request
result = self.prepare()
if result: