File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
java/ql/test/query-tests/security/CWE-807/semmle/tests Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,15 @@ public static void main(HttpServletRequest request) throws Exception {
49
49
if (Inet4Address .getLocalHost ().getCanonicalHostName ().equals ("localhost" )) {
50
50
login (user , password );
51
51
}
52
+
53
+ InetAddress loopback = InetAddress .getLoopbackAddress ();
54
+ // GOOD: reverse DNS on loopback address is fine
55
+ if (loopback .getCanonicalHostName ().equals ("localhost" )) {
56
+ login (user , password ); // $ SPURIOUS: hasConditionalBypassTest
57
+ }
58
+ if (Inet4Address .getLoopbackAddress ().getCanonicalHostName ().equals ("localhost" )) {
59
+ login (user , password ); // $ SPURIOUS: hasConditionalBypassTest
60
+ }
52
61
}
53
62
54
63
public static void test (String user , String password ) {
You can’t perform that action at this time.
0 commit comments