From a899ad47b8b9d950aed946030ad29fe5d0bd371b Mon Sep 17 00:00:00 2001 From: janani-cr <123922497+janani-cr@users.noreply.github.com> Date: Tue, 31 Jan 2023 00:09:34 -0600 Subject: [PATCH 1/4] Update BenchmarkTest02100.java --- .../java/org/owasp/benchmark/testcode/BenchmarkTest02100.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java b/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java index 5833efd4f0..397b948696 100644 --- a/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java +++ b/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java @@ -33,6 +33,8 @@ public class BenchmarkTest02100 extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + if (!whiteList.contains(request)) + throw new IOException; doPost(request, response); } From 71bbd38153e81e1ce5ae3b9f0d11cb0ac8500db9 Mon Sep 17 00:00:00 2001 From: janani-cr <123922497+janani-cr@users.noreply.github.com> Date: Tue, 31 Jan 2023 00:24:54 -0600 Subject: [PATCH 2/4] Update BenchmarkTest02100.java --- .../java/org/owasp/benchmark/testcode/BenchmarkTest02100.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java b/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java index 397b948696..9b05fb9f02 100644 --- a/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java +++ b/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java @@ -33,7 +33,7 @@ public class BenchmarkTest02100 extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - if (!whiteList.contains(request)) + if (request.getContentLength() == 0) throw new IOException; doPost(request, response); } From 4b6287a2aca8a0aff0716b2bdbb446bc7410301b Mon Sep 17 00:00:00 2001 From: janani-cr <123922497+janani-cr@users.noreply.github.com> Date: Tue, 31 Jan 2023 00:29:46 -0600 Subject: [PATCH 3/4] Update BenchmarkTest02100.java --- .../java/org/owasp/benchmark/testcode/BenchmarkTest02100.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java b/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java index 9b05fb9f02..39fed687bb 100644 --- a/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java +++ b/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java @@ -33,8 +33,9 @@ public class BenchmarkTest02100 extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - if (request.getContentLength() == 0) + if (request.getContentLength() == 0) { throw new IOException; + } doPost(request, response); } From 0a26f8de30ebae57302dc3db9e8f972b7ff179ca Mon Sep 17 00:00:00 2001 From: janani-cr <123922497+janani-cr@users.noreply.github.com> Date: Tue, 31 Jan 2023 00:32:43 -0600 Subject: [PATCH 4/4] Update BenchmarkTest02100.java --- .../org/owasp/benchmark/testcode/BenchmarkTest02100.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java b/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java index 39fed687bb..ae68b8f98b 100644 --- a/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java +++ b/src/main/java/org/owasp/benchmark/testcode/BenchmarkTest02100.java @@ -33,10 +33,9 @@ public class BenchmarkTest02100 extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - if (request.getContentLength() == 0) { - throw new IOException; + if (request.getContentLength() != 0) { + doPost(request, response); } - doPost(request, response); } @Override