diff --git a/ webgoat/main/project/JavaSource/org/owasp/webgoat/HammerHead.java b/ webgoat/main/project/JavaSource/org/owasp/webgoat/HammerHead.java index 742ef9668..6cbfd27af 100644 --- a/ webgoat/main/project/JavaSource/org/owasp/webgoat/HammerHead.java +++ b/ webgoat/main/project/JavaSource/org/owasp/webgoat/HammerHead.java @@ -5,7 +5,6 @@ import java.io.PrintWriter; import java.sql.SQLException; import java.text.SimpleDateFormat; import java.util.Date; -import java.util.Enumeration; import java.util.Locale; import java.util.TimeZone; @@ -236,27 +235,6 @@ public class HammerHead extends HttpServlet return page; } - - /** - * Description of the Method - * - * @param session - * Description of the Parameter - */ - private void dumpSession(HttpSession session) - { - Enumeration enumerator = session.getAttributeNames(); - - while (enumerator.hasMoreElements()) - { - String name = (String) enumerator.nextElement(); - Object value = session.getAttribute(name); - System.out.println("Name: " + name); - System.out.println("Value: " + value); - } - } - - /** * Description of the Method * diff --git a/ webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/CommandInjection.java b/ webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/CommandInjection.java index 377882681..8d126adcf 100644 --- a/ webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/CommandInjection.java +++ b/ webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/CommandInjection.java @@ -14,7 +14,6 @@ import org.apache.ecs.html.BR; import org.apache.ecs.html.HR; import org.apache.ecs.html.IMG; import org.apache.ecs.html.P; -import org.apache.ecs.html.PRE; import org.owasp.webgoat.session.ECSFactory; import org.owasp.webgoat.session.WebSession; @@ -76,7 +75,6 @@ public class CommandInjection extends LessonAdapter { String helpFile = s.getParser().getRawParameter(HELP_FILE, "BasicAuthentication.help"); - String safeDirName; if (getWebgoatContext().isDefuseOSCommands() && (helpFile.indexOf('&') != -1 || helpFile.indexOf(';') != -1)) { @@ -134,8 +132,7 @@ public class CommandInjection extends LessonAdapter if (upDirCount(helpFile) <= 3) { // FIXME: This value isn't used. What is the goal here? - safeDirName = s.getContext().getRealPath("/") - + helpFile; + s.getContext().getRealPath("/"); illegalCommand = false; } else @@ -295,31 +292,6 @@ public class CommandInjection extends LessonAdapter return (er.toString()); } - - /** - * Description of the Method - * - * @param command Description of the Parameter - * @param args Description of the Parameter - * @param s Description of the Parameter - * @return Description of the Return Value - */ - private Element exec(WebSession s, String command, String args) - { - System.out.println("Executing OS command: '" + command - + "' with args: '" + args + "'"); - ExecResults er = Exec.execSimple(command, args); - if ((args.indexOf("&") != -1 || args.indexOf(";") != -1) - && !er.getError()) - { - makeSuccess(s); - } - PRE p = new PRE().addElement(er.toString()); - - return (p); - } - - /** * Gets the category attribute of the CommandInjection object * diff --git a/ webgoat/main/project/JavaSource/org/owasp/webgoat/session/WebSession.java b/ webgoat/main/project/JavaSource/org/owasp/webgoat/session/WebSession.java index 7ab754805..f198d6d78 100644 --- a/ webgoat/main/project/JavaSource/org/owasp/webgoat/session/WebSession.java +++ b/ webgoat/main/project/JavaSource/org/owasp/webgoat/session/WebSession.java @@ -10,7 +10,6 @@ import java.util.Collections; import java.util.Enumeration; import java.util.HashMap; import java.util.Hashtable; -import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Vector; diff --git a/ webgoat/main/project/WebContent/lessons/DBCrossSiteScripting/ViewProfile.jsp b/ webgoat/main/project/WebContent/lessons/DBCrossSiteScripting/ViewProfile.jsp index d18cd705a..ce0fee2b2 100755 --- a/ webgoat/main/project/WebContent/lessons/DBCrossSiteScripting/ViewProfile.jsp +++ b/ webgoat/main/project/WebContent/lessons/DBCrossSiteScripting/ViewProfile.jsp @@ -3,8 +3,6 @@ <% WebSession webSession = ((WebSession)session.getAttribute("websession")); Employee employee = (Employee) session.getAttribute("DBCrossSiteScripting." + DBCrossSiteScripting.EMPLOYEE_ATTRIBUTE_KEY); - DBCrossSiteScripting lesson = (DBCrossSiteScripting) webSession.getCurrentLesson(); -// int myUserId = getIntSessionAttribute(webSession, "DBCrossSiteScripting." + DBCrossSiteScripting.USER_ID); %>
Welcome Back <%=webSession.getUserNameInLesson()%>