File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
lib/semmle/code/java/dataflow
test/query-tests/security/CWE-807/semmle/tests Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ private class ReverseDnsSource extends RemoteFlowSource {
126126 m .getMethod ( ) instanceof ReverseDnsMethod and
127127 not exists ( MethodCall l |
128128 ( variableStep ( l , m .getQualifier ( ) ) or l = m .getQualifier ( ) ) and
129- l .getMethod ( ) .getName ( ) = "getLocalHost"
129+ ( l .getMethod ( ) .getName ( ) = "getLocalHost" or l . getMethod ( ) . getName ( ) = "getLoopbackAddress" )
130130 )
131131 )
132132 }
Original file line number Diff line number Diff line change @@ -53,10 +53,10 @@ public static void main(HttpServletRequest request) throws Exception {
5353 InetAddress loopback = InetAddress .getLoopbackAddress ();
5454 // GOOD: reverse DNS on loopback address is fine
5555 if (loopback .getCanonicalHostName ().equals ("localhost" )) {
56- login (user , password ); // $ SPURIOUS: hasConditionalBypassTest
56+ login (user , password ); // $ hasConditionalBypassTest
5757 }
5858 if (Inet4Address .getLoopbackAddress ().getCanonicalHostName ().equals ("localhost" )) {
59- login (user , password ); // $ SPURIOUS: hasConditionalBypassTest
59+ login (user , password ); // $ hasConditionalBypassTest
6060 }
6161 }
6262
You can’t perform that action at this time.
0 commit comments