File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
java/ql/src/Security/CWE/CWE-209 Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,10 @@ import semmle.code.java.security.XSS
22
22
*/
23
23
class PrintStackTraceMethod extends Method {
24
24
PrintStackTraceMethod ( ) {
25
- getDeclaringType ( ) .hasQualifiedName ( "java.lang" , "Throwable" ) and
25
+ getDeclaringType ( )
26
+ .getSourceDeclaration ( )
27
+ .getASourceSupertype * ( )
28
+ .hasQualifiedName ( "java.lang" , "Throwable" ) and
26
29
getName ( ) = "printStackTrace"
27
30
}
28
31
}
@@ -96,7 +99,8 @@ class StackTraceStringToXssSinkFlowConfig extends TaintTracking2::Configuration
96
99
*/
97
100
predicate printsStackExternally ( MethodAccess call , Expr stackTrace ) {
98
101
printsStackToWriter ( call ) and
99
- call .getQualifier ( ) = stackTrace
102
+ call .getQualifier ( ) = stackTrace and
103
+ not call .getQualifier ( ) instanceof SuperAccess
100
104
}
101
105
102
106
/**
You can’t perform that action at this time.
0 commit comments