File tree Expand file tree Collapse file tree
experimental/Security/CWE/CWE-598
semmle/code/java/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ class SensitiveInfoExpr extends Expr {
2424}
2525
2626/** Holds if `m` is a method of some override of `HttpServlet.doGet`. */
27- private predicate isGetServletMethod ( Method m ) { isServletMethod ( m ) and m .getName ( ) = "doGet" }
27+ private predicate isGetServletMethod ( Method m ) {
28+ isServletRequestMethod ( m ) and m .getName ( ) = "doGet"
29+ }
2830
2931/** The `doGet` method of `HttpServlet`. */
3032class DoGetServletMethod extends Method {
@@ -63,7 +65,7 @@ class SensitiveGetQueryConfiguration extends TaintTracking::Configuration {
6365
6466 /** Holds if the node is in a servlet method other than `doGet`. */
6567 override predicate isSanitizer ( DataFlow:: Node node ) {
66- isServletMethod ( node .getEnclosingCallable ( ) ) and
68+ isServletRequestMethod ( node .getEnclosingCallable ( ) ) and
6769 not isGetServletMethod ( node .getEnclosingCallable ( ) )
6870 }
6971}
Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ class ServletWebXMLListenerType extends RefType {
324324}
325325
326326/** Holds if `m` is a request handler method (for example `doGet` or `doPost`). */
327- predicate isServletMethod ( Method m ) {
327+ predicate isServletRequestMethod ( Method m ) {
328328 m .getDeclaringType ( ) instanceof ServletClass and
329329 m .getNumberOfParameters ( ) = 2 and
330330 m .getParameter ( 0 ) .getType ( ) instanceof ServletRequest and
You can’t perform that action at this time.
0 commit comments