Class XSRFGate

java.lang.Object
com.zfabrik.util.microweb.actions.XSRFGate
All Implemented Interfaces:
IAction

public class XSRFGate extends Object implements IAction
In order to block Cross-Site Request Forgery attacks, we require that a request provides the current session id as a parameter by the name jsessionid. This blocks attackers that send GETs or POSTs to foreign domain from invoking an action.
  • Field Details

  • Constructor Details

    • XSRFGate

      public XSRFGate(IAction wrapped)
  • Method Details

    • handle

      public OutCome handle(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException
      Specified by:
      handle in interface IAction
      Throws:
      javax.servlet.ServletException
      IOException
    • check

      public static OutCome check(javax.servlet.http.HttpServletRequest req, String passkey)