public class XssHttpServletRequestWrapper
extends javax.servlet.http.HttpServletRequestWrapper
| 构造器和说明 |
|---|
XssHttpServletRequestWrapper(javax.servlet.http.HttpServletRequest request) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getHeader(String name)
覆盖getHeader方法,将参数名和参数值都做xss过滤。
|
javax.servlet.http.HttpServletRequest |
getOrgRequest()
获取最原始的request
|
static javax.servlet.http.HttpServletRequest |
getOrgRequest(javax.servlet.http.HttpServletRequest req)
获取最原始的request的静态方法
|
String |
getParameter(String name)
覆盖getParameter方法,将参数名和参数值都做xss过滤
如果需要获得原始的值,则通过super.getParameterValues(name)来获取 getParameterNames,getParameterValues和getParameterMap也可能需要覆盖 |
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole, login, logout, upgradegetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsyncgetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsyncpublic XssHttpServletRequestWrapper(javax.servlet.http.HttpServletRequest request)
public String getParameter(String name)
getParameter 在接口中 javax.servlet.ServletRequestgetParameter 在类中 javax.servlet.ServletRequestWrappername - Parameter名public String getHeader(String name)
getHeader 在接口中 javax.servlet.http.HttpServletRequestgetHeader 在类中 javax.servlet.http.HttpServletRequestWrappername - header名public javax.servlet.http.HttpServletRequest getOrgRequest()
public static javax.servlet.http.HttpServletRequest getOrgRequest(javax.servlet.http.HttpServletRequest req)
req - HttpServletRequestCopyright © 2020. All rights reserved.