Skip to content

Commit 774baea

Browse files
committed
Add test case based on missing result
1 parent a319fc0 commit 774baea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

java/ql/test/query-tests/security/CWE-918/SanitizationTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response)
116116
HttpRequest unsafer9 = HttpRequest.newBuilder(new URI(unsafeUri9)).build(); // $ SSRF
117117
client.send(unsafer9, null);
118118

119+
String unsafeUri10 = String.format("%s://%s:%s%s", "http", "myserver.com", "80", request.getParameter("baduri10"));
120+
HttpRequest unsafer10 = HttpRequest.newBuilder(new URI(unsafeUri10)).build(); // $ SSRF
121+
client.send(unsafer10, null);
119122
} catch (Exception e) {
120123
// TODO: handle exception
121124
}

0 commit comments

Comments
 (0)