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 {
4949 if (Inet4Address .getLocalHost ().getCanonicalHostName ().equals ("localhost" )) {
5050 login (user , password );
5151 }
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+ }
5261 }
5362
5463 public static void test (String user , String password ) {
You can’t perform that action at this time.
0 commit comments