Class DosGuardFilter

java.lang.Object
fr.paris.lutece.portal.web.upload.DosGuardFilter
All Implemented Interfaces:
jakarta.servlet.Filter

public class DosGuardFilter extends Object implements jakarta.servlet.Filter
A rewrite of the multipart filter from the com.oreilly.servlet package. The rewrite allows us to use initialization parameters specified in the Lutece configuration files.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    void
    doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain)
    void
    init(jakarta.servlet.FilterConfig config)
    boolean
    isAllowed(String strRemoteAddr, int iContentLength)
    Checks if a client is allowed to make a request at the present time.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DosGuardFilter

      public DosGuardFilter()
  • Method Details

    • init

      public void init(jakarta.servlet.FilterConfig config) throws jakarta.servlet.ServletException
      Specified by:
      init in interface jakarta.servlet.Filter
      Throws:
      jakarta.servlet.ServletException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface jakarta.servlet.Filter
    • doFilter

      public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException
      Specified by:
      doFilter in interface jakarta.servlet.Filter
      Throws:
      IOException
      jakarta.servlet.ServletException
    • isAllowed

      public boolean isAllowed(String strRemoteAddr, int iContentLength)
      Checks if a client is allowed to make a request at the present time.
      Parameters:
      strRemoteAddr - the IP address of the client
      iContentLength - the size of the request
      Returns:
      true if allowed, false otherwize