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 {
126
126
m .getMethod ( ) instanceof ReverseDnsMethod and
127
127
not exists ( MethodCall l |
128
128
( variableStep ( l , m .getQualifier ( ) ) or l = m .getQualifier ( ) ) and
129
- l .getMethod ( ) .getName ( ) = "getLocalHost"
129
+ ( l .getMethod ( ) .getName ( ) = "getLocalHost" or l . getMethod ( ) . getName ( ) = "getLoopbackAddress" )
130
130
)
131
131
)
132
132
}
Original file line number Diff line number Diff line change @@ -53,10 +53,10 @@ public static void main(HttpServletRequest request) throws Exception {
53
53
InetAddress loopback = InetAddress .getLoopbackAddress ();
54
54
// GOOD: reverse DNS on loopback address is fine
55
55
if (loopback .getCanonicalHostName ().equals ("localhost" )) {
56
- login (user , password ); // $ SPURIOUS: hasConditionalBypassTest
56
+ login (user , password ); // $ hasConditionalBypassTest
57
57
}
58
58
if (Inet4Address .getLoopbackAddress ().getCanonicalHostName ().equals ("localhost" )) {
59
- login (user , password ); // $ SPURIOUS: hasConditionalBypassTest
59
+ login (user , password ); // $ hasConditionalBypassTest
60
60
}
61
61
}
62
62
You can’t perform that action at this time.
0 commit comments