Package org.apache.hadoop.hbase.http
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.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
void
doFilter
(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) private String
inferMimeType
(javax.servlet.ServletRequest request) Infer the mime type for the response based on the extension of the request URI.void
init
(javax.servlet.FilterConfig config)
-
Field Details
-
config
-
-
Constructor Details
-
QuotingInputFilter
public QuotingInputFilter()
-
-
Method Details
-
init
- Specified by:
init
in interfacejavax.servlet.Filter
- Throws:
javax.servlet.ServletException
-
destroy
- Specified by:
destroy
in interfacejavax.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 interfacejavax.servlet.Filter
- Throws:
IOException
javax.servlet.ServletException
-
inferMimeType
Infer the mime type for the response based on the extension of the request URI. Returns null if unknown.
-