mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
delete tomcat-embed-core stub, update the ServletGetMethod class
This commit is contained in:
@@ -21,7 +21,7 @@ abstract class RequestGetMethod extends Method {
|
|||||||
|
|
||||||
/** Override method of `doGet` of `Servlet` subclass. */
|
/** Override method of `doGet` of `Servlet` subclass. */
|
||||||
private class ServletGetMethod extends RequestGetMethod {
|
private class ServletGetMethod extends RequestGetMethod {
|
||||||
ServletGetMethod() { isServletRequestMethod(this) and m.getName() = "doGet" }
|
ServletGetMethod() { isServletRequestMethod(this) and this.getName() = "doGet" }
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The method of SpringController class processing `get` request. */
|
/** The method of SpringController class processing `get` request. */
|
||||||
|
|||||||
@@ -361,13 +361,3 @@ predicate isDoFilterMethod(Method m) {
|
|||||||
m.getParameter(1).getType() instanceof ServletResponse and
|
m.getParameter(1).getType() instanceof ServletResponse and
|
||||||
m.getParameter(2).getType() instanceof FilterChain
|
m.getParameter(2).getType() instanceof FilterChain
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Holds if `m` is a method of some override of `HttpServlet.doGet`. */
|
|
||||||
predicate isGetServletMethod(Method m) {
|
|
||||||
isServletRequestMethod(m) and m.getName() = "doGet"
|
|
||||||
}
|
|
||||||
|
|
||||||
/** The `doGet` method of `HttpServlet`. */
|
|
||||||
class DoGetServletMethod extends Method {
|
|
||||||
DoGetServletMethod() { isGetServletMethod(this) }
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
package javax.servlet;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
public interface Filter {
|
|
||||||
default void init(FilterConfig filterConfig) throws ServletException {
|
|
||||||
}
|
|
||||||
|
|
||||||
void doFilter(ServletRequest var1, ServletResponse var2, FilterChain var3) throws IOException, ServletException;
|
|
||||||
|
|
||||||
default void destroy() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package javax.servlet;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
public interface FilterChain {
|
|
||||||
void doFilter(ServletRequest var1, ServletResponse var2) throws IOException, ServletException;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
package javax.servlet;
|
|
||||||
|
|
||||||
public interface FilterConfig {}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package javax.servlet;
|
|
||||||
|
|
||||||
public class ServletException extends Exception {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
public ServletException() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
package javax.servlet;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.util.Enumeration;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public interface ServletRequest {
|
|
||||||
Object getAttribute(String var1);
|
|
||||||
|
|
||||||
Enumeration<String> getAttributeNames();
|
|
||||||
|
|
||||||
String getCharacterEncoding();
|
|
||||||
|
|
||||||
void setCharacterEncoding(String var1) throws UnsupportedEncodingException;
|
|
||||||
|
|
||||||
int getContentLength();
|
|
||||||
|
|
||||||
long getContentLengthLong();
|
|
||||||
|
|
||||||
String getContentType();
|
|
||||||
|
|
||||||
ServletInputStream getInputStream() throws IOException;
|
|
||||||
|
|
||||||
String getParameter(String var1);
|
|
||||||
|
|
||||||
Enumeration<String> getParameterNames();
|
|
||||||
|
|
||||||
String[] getParameterValues(String var1);
|
|
||||||
|
|
||||||
Map<String, String[]> getParameterMap();
|
|
||||||
|
|
||||||
String getProtocol();
|
|
||||||
|
|
||||||
String getScheme();
|
|
||||||
|
|
||||||
String getServerName();
|
|
||||||
|
|
||||||
int getServerPort();
|
|
||||||
|
|
||||||
BufferedReader getReader() throws IOException;
|
|
||||||
|
|
||||||
String getRemoteAddr();
|
|
||||||
|
|
||||||
String getRemoteHost();
|
|
||||||
|
|
||||||
void setAttribute(String var1, Object var2);
|
|
||||||
|
|
||||||
void removeAttribute(String var1);
|
|
||||||
|
|
||||||
Locale getLocale();
|
|
||||||
|
|
||||||
Enumeration<Locale> getLocales();
|
|
||||||
|
|
||||||
boolean isSecure();
|
|
||||||
|
|
||||||
RequestDispatcher getRequestDispatcher(String var1);
|
|
||||||
|
|
||||||
/** @deprecated */
|
|
||||||
@Deprecated
|
|
||||||
String getRealPath(String var1);
|
|
||||||
|
|
||||||
int getRemotePort();
|
|
||||||
|
|
||||||
String getLocalName();
|
|
||||||
|
|
||||||
String getLocalAddr();
|
|
||||||
|
|
||||||
int getLocalPort();
|
|
||||||
|
|
||||||
ServletContext getServletContext();
|
|
||||||
|
|
||||||
AsyncContext startAsync() throws IllegalStateException;
|
|
||||||
|
|
||||||
AsyncContext startAsync(ServletRequest var1, ServletResponse var2) throws IllegalStateException;
|
|
||||||
|
|
||||||
boolean isAsyncStarted();
|
|
||||||
|
|
||||||
boolean isAsyncSupported();
|
|
||||||
|
|
||||||
AsyncContext getAsyncContext();
|
|
||||||
|
|
||||||
DispatcherType getDispatcherType();
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
package javax.servlet;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
public interface ServletResponse {
|
|
||||||
String getCharacterEncoding();
|
|
||||||
|
|
||||||
String getContentType();
|
|
||||||
|
|
||||||
ServletOutputStream getOutputStream() throws IOException;
|
|
||||||
|
|
||||||
PrintWriter getWriter() throws IOException;
|
|
||||||
|
|
||||||
void setCharacterEncoding(String var1);
|
|
||||||
|
|
||||||
void setContentLength(int var1);
|
|
||||||
|
|
||||||
void setContentLengthLong(long var1);
|
|
||||||
|
|
||||||
void setContentType(String var1);
|
|
||||||
|
|
||||||
void setBufferSize(int var1);
|
|
||||||
|
|
||||||
int getBufferSize();
|
|
||||||
|
|
||||||
void flushBuffer() throws IOException;
|
|
||||||
|
|
||||||
void resetBuffer();
|
|
||||||
|
|
||||||
boolean isCommitted();
|
|
||||||
|
|
||||||
void reset();
|
|
||||||
|
|
||||||
void setLocale(Locale var1);
|
|
||||||
|
|
||||||
Locale getLocale();
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
package javax.servlet.annotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.Documented;
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
@Target({ElementType.TYPE})
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
@Documented
|
|
||||||
public @interface WebServlet {
|
|
||||||
String name() default "";
|
|
||||||
|
|
||||||
String[] value() default {};
|
|
||||||
|
|
||||||
String[] urlPatterns() default {};
|
|
||||||
|
|
||||||
int loadOnStartup() default -1;
|
|
||||||
|
|
||||||
boolean asyncSupported() default false;
|
|
||||||
|
|
||||||
String smallIcon() default "";
|
|
||||||
|
|
||||||
String largeIcon() default "";
|
|
||||||
|
|
||||||
String description() default "";
|
|
||||||
|
|
||||||
String displayName() default "";
|
|
||||||
}
|
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
package javax.servlet.http;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.security.Principal;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Enumeration;
|
|
||||||
import java.util.Map;
|
|
||||||
import javax.servlet.ServletException;
|
|
||||||
import javax.servlet.ServletRequest;
|
|
||||||
|
|
||||||
public interface HttpServletRequest extends ServletRequest {
|
|
||||||
String BASIC_AUTH = "BASIC";
|
|
||||||
String FORM_AUTH = "FORM";
|
|
||||||
String CLIENT_CERT_AUTH = "CLIENT_CERT";
|
|
||||||
String DIGEST_AUTH = "DIGEST";
|
|
||||||
|
|
||||||
String getAuthType();
|
|
||||||
|
|
||||||
Cookie[] getCookies();
|
|
||||||
|
|
||||||
long getDateHeader(String var1);
|
|
||||||
|
|
||||||
String getHeader(String var1);
|
|
||||||
|
|
||||||
Enumeration<String> getHeaders(String var1);
|
|
||||||
|
|
||||||
Enumeration<String> getHeaderNames();
|
|
||||||
|
|
||||||
int getIntHeader(String var1);
|
|
||||||
|
|
||||||
default HttpServletMapping getHttpServletMapping() {
|
|
||||||
return new HttpServletMapping() {
|
|
||||||
public String getMatchValue() {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPattern() {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getServletName() {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
public MappingMatch getMappingMatch() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
String getMethod();
|
|
||||||
|
|
||||||
String getPathInfo();
|
|
||||||
|
|
||||||
String getPathTranslated();
|
|
||||||
|
|
||||||
default PushBuilder newPushBuilder() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
String getContextPath();
|
|
||||||
|
|
||||||
String getQueryString();
|
|
||||||
|
|
||||||
String getRemoteUser();
|
|
||||||
|
|
||||||
boolean isUserInRole(String var1);
|
|
||||||
|
|
||||||
Principal getUserPrincipal();
|
|
||||||
|
|
||||||
String getRequestedSessionId();
|
|
||||||
|
|
||||||
String getRequestURI();
|
|
||||||
|
|
||||||
StringBuffer getRequestURL();
|
|
||||||
|
|
||||||
String getServletPath();
|
|
||||||
|
|
||||||
HttpSession getSession(boolean var1);
|
|
||||||
|
|
||||||
HttpSession getSession();
|
|
||||||
|
|
||||||
String changeSessionId();
|
|
||||||
|
|
||||||
boolean isRequestedSessionIdValid();
|
|
||||||
|
|
||||||
boolean isRequestedSessionIdFromCookie();
|
|
||||||
|
|
||||||
boolean isRequestedSessionIdFromURL();
|
|
||||||
|
|
||||||
/** @deprecated */
|
|
||||||
@Deprecated
|
|
||||||
boolean isRequestedSessionIdFromUrl();
|
|
||||||
|
|
||||||
boolean authenticate(HttpServletResponse var1) throws IOException, ServletException;
|
|
||||||
|
|
||||||
void login(String var1, String var2) throws ServletException;
|
|
||||||
|
|
||||||
void logout() throws ServletException;
|
|
||||||
|
|
||||||
Collection<Part> getParts() throws IOException, ServletException;
|
|
||||||
|
|
||||||
Part getPart(String var1) throws IOException, ServletException;
|
|
||||||
|
|
||||||
<T extends HttpUpgradeHandler> T upgrade(Class<T> var1) throws IOException, ServletException;
|
|
||||||
|
|
||||||
default Map<String, String> getTrailerFields() {
|
|
||||||
return Collections.emptyMap();
|
|
||||||
}
|
|
||||||
|
|
||||||
default boolean isTrailerFieldsReady() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
package javax.servlet.http;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
import javax.servlet.ServletResponse;
|
|
||||||
|
|
||||||
public interface HttpServletResponse extends ServletResponse {
|
|
||||||
int SC_CONTINUE = 100;
|
|
||||||
int SC_SWITCHING_PROTOCOLS = 101;
|
|
||||||
int SC_OK = 200;
|
|
||||||
int SC_CREATED = 201;
|
|
||||||
int SC_ACCEPTED = 202;
|
|
||||||
int SC_NON_AUTHORITATIVE_INFORMATION = 203;
|
|
||||||
int SC_NO_CONTENT = 204;
|
|
||||||
int SC_RESET_CONTENT = 205;
|
|
||||||
int SC_PARTIAL_CONTENT = 206;
|
|
||||||
int SC_MULTIPLE_CHOICES = 300;
|
|
||||||
int SC_MOVED_PERMANENTLY = 301;
|
|
||||||
int SC_MOVED_TEMPORARILY = 302;
|
|
||||||
int SC_FOUND = 302;
|
|
||||||
int SC_SEE_OTHER = 303;
|
|
||||||
int SC_NOT_MODIFIED = 304;
|
|
||||||
int SC_USE_PROXY = 305;
|
|
||||||
int SC_TEMPORARY_REDIRECT = 307;
|
|
||||||
int SC_BAD_REQUEST = 400;
|
|
||||||
int SC_UNAUTHORIZED = 401;
|
|
||||||
int SC_PAYMENT_REQUIRED = 402;
|
|
||||||
int SC_FORBIDDEN = 403;
|
|
||||||
int SC_NOT_FOUND = 404;
|
|
||||||
int SC_METHOD_NOT_ALLOWED = 405;
|
|
||||||
int SC_NOT_ACCEPTABLE = 406;
|
|
||||||
int SC_PROXY_AUTHENTICATION_REQUIRED = 407;
|
|
||||||
int SC_REQUEST_TIMEOUT = 408;
|
|
||||||
int SC_CONFLICT = 409;
|
|
||||||
int SC_GONE = 410;
|
|
||||||
int SC_LENGTH_REQUIRED = 411;
|
|
||||||
int SC_PRECONDITION_FAILED = 412;
|
|
||||||
int SC_REQUEST_ENTITY_TOO_LARGE = 413;
|
|
||||||
int SC_REQUEST_URI_TOO_LONG = 414;
|
|
||||||
int SC_UNSUPPORTED_MEDIA_TYPE = 415;
|
|
||||||
int SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
|
|
||||||
int SC_EXPECTATION_FAILED = 417;
|
|
||||||
int SC_INTERNAL_SERVER_ERROR = 500;
|
|
||||||
int SC_NOT_IMPLEMENTED = 501;
|
|
||||||
int SC_BAD_GATEWAY = 502;
|
|
||||||
int SC_SERVICE_UNAVAILABLE = 503;
|
|
||||||
int SC_GATEWAY_TIMEOUT = 504;
|
|
||||||
int SC_HTTP_VERSION_NOT_SUPPORTED = 505;
|
|
||||||
|
|
||||||
void addCookie(Cookie var1);
|
|
||||||
|
|
||||||
boolean containsHeader(String var1);
|
|
||||||
|
|
||||||
String encodeURL(String var1);
|
|
||||||
|
|
||||||
String encodeRedirectURL(String var1);
|
|
||||||
|
|
||||||
/** @deprecated */
|
|
||||||
@Deprecated
|
|
||||||
String encodeUrl(String var1);
|
|
||||||
|
|
||||||
/** @deprecated */
|
|
||||||
@Deprecated
|
|
||||||
String encodeRedirectUrl(String var1);
|
|
||||||
|
|
||||||
void sendError(int var1, String var2) throws IOException;
|
|
||||||
|
|
||||||
void sendError(int var1) throws IOException;
|
|
||||||
|
|
||||||
void sendRedirect(String var1) throws IOException;
|
|
||||||
|
|
||||||
void setDateHeader(String var1, long var2);
|
|
||||||
|
|
||||||
void addDateHeader(String var1, long var2);
|
|
||||||
|
|
||||||
void setHeader(String var1, String var2);
|
|
||||||
|
|
||||||
void addHeader(String var1, String var2);
|
|
||||||
|
|
||||||
void setIntHeader(String var1, int var2);
|
|
||||||
|
|
||||||
void addIntHeader(String var1, int var2);
|
|
||||||
|
|
||||||
void setStatus(int var1);
|
|
||||||
|
|
||||||
/** @deprecated */
|
|
||||||
@Deprecated
|
|
||||||
void setStatus(int var1, String var2);
|
|
||||||
|
|
||||||
int getStatus();
|
|
||||||
|
|
||||||
String getHeader(String var1);
|
|
||||||
|
|
||||||
Collection<String> getHeaders(String var1);
|
|
||||||
|
|
||||||
Collection<String> getHeaderNames();
|
|
||||||
|
|
||||||
default void setTrailerFields(Supplier<Map<String, String>> supplier) {
|
|
||||||
}
|
|
||||||
|
|
||||||
default Supplier<Map<String, String>> getTrailerFields() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user