Skip to content

Commit 2a5144d

Browse files
committed
Improve tests for reverse DNS sources
1 parent a64eafc commit 2a5144d

File tree

1 file changed

+5
-0
lines changed
  • java/ql/test/library-tests/dataflow/taintsources

1 file changed

+5
-0
lines changed

java/ql/test/library-tests/dataflow/taintsources/A.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ public void test(ResultSet rs) throws SQLException {
4444
sink(new URL("test").openConnection().getInputStream()); // $hasRemoteValueFlow
4545
sink(new Socket("test", 1234).getInputStream()); // $hasRemoteValueFlow
4646
sink(InetAddress.getByName("test").getHostName()); // $hasReverseDnsValueFlow
47+
sink(InetAddress.getLocalHost().getHostName());
48+
sink(InetAddress.getLoopbackAddress().getHostName());
49+
sink(InetAddress.getByName("test").getCanonicalHostName()); // $hasReverseDnsValueFlow
50+
sink(InetAddress.getLocalHost().getCanonicalHostName());
51+
sink(InetAddress.getLoopbackAddress().getCanonicalHostName());
4752

4853
sink(System.in); // $hasLocalValueFlow
4954
sink(new FileInputStream("test")); // $hasLocalValueFlow

0 commit comments

Comments
 (0)