4546474849505152
String errorPage = getParameter("Page"); try { response.sendRedirect(errorPage); } catch (IOException ioe) { throw new CsrfGuardException(ioe); } }
4647484950515253
String message = getParameter("Message"); try { response.sendError(code, message); } catch (IOException ioe) { throw new CsrfGuardException(ioe); } }
62636465666768697071
try { token = RandomGenerator.generateRandomId(csrfGuard.getPrng(), csrfGuard.getTokenLength()); } catch (Exception e) { throw new CsrfGuardException(String.format("unable to generate the random token - %s", e.getLocalizedMessage()), e); } session.setAttribute(csrfGuard.getSessionKey(), token); }
8384858687888990919293
String token = null; try { token = RandomGenerator.generateRandomId(csrfGuard.getPrng(), csrfGuard.getTokenLength()); } catch (Exception e) { throw new CsrfGuardException(String.format("unable to generate the random token - %s", e.getLocalizedMessage()), e); } pageTokens.put(page, token); } }
46474849505152535455
String errorPage = getParameter("Page"); try { request.getRequestDispatcher(errorPage).forward(request, response); } catch (IOException ioe) { throw new CsrfGuardException(ioe); } catch (ServletException se) { throw new CsrfGuardException(se); } }