Class HttpServer.QuotingInputFilter

java.lang.Object
org.apache.hadoop.hbase.http.HttpServer.QuotingInputFilter
All Implemented Interfaces:
javax.servlet.Filter
Enclosing class:
HttpServer

@LimitedPrivate("Configuration") public static class HttpServer.QuotingInputFilter extends Object implements javax.servlet.Filter
A Servlet input filter that quotes all HTML active characters in the parameter names and values. The goal is to quote the characters to make all of the servlets resistant to cross-site scripting attacks.
  • Field Details

    • config

      private javax.servlet.FilterConfig config
  • Constructor Details

  • Method Details

    • init

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

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

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

      private String inferMimeType(javax.servlet.ServletRequest request)
      Infer the mime type for the response based on the extension of the request URI. Returns null if unknown.