From 97d8abfe49524ec4cd5b385be0c89cc59e0181e9 Mon Sep 17 00:00:00 2001 From: Kohei Tamura Date: Wed, 20 Sep 2017 16:24:41 +0900 Subject: [PATCH] Remove unnecessary URL check --- .../easybuggy/vulnerabilities/OpenRedirectServlet.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/main/java/org/t246osslab/easybuggy/vulnerabilities/OpenRedirectServlet.java b/src/main/java/org/t246osslab/easybuggy/vulnerabilities/OpenRedirectServlet.java index 26d0f656..4063d00e 100644 --- a/src/main/java/org/t246osslab/easybuggy/vulnerabilities/OpenRedirectServlet.java +++ b/src/main/java/org/t246osslab/easybuggy/vulnerabilities/OpenRedirectServlet.java @@ -62,12 +62,6 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) thr String gotoUrl = request.getParameter("goto"); if (gotoUrl != null) { - try { - URL u = new URL(gotoUrl); - gotoUrl = u.toURI().toString(); - } catch (Exception e) { - log.warn("Invalid goto Url: {}", gotoUrl); - } response.sendRedirect(gotoUrl); } else { String target = (String) session.getAttribute("target");