Fix warnings
git-svn-id: http://webgoat.googlecode.com/svn/trunk@185 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
parent
9ea97126b8
commit
d709ff9506
@ -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
|
||||
*
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
%>
|
||||
<div class="lesson_title_box"><strong>Welcome Back </strong><span class="lesson_text_db"><%=webSession.getUserNameInLesson()%></span></div>
|
||||
<div class="lesson_text">
|
||||
|
Loading…
x
Reference in New Issue
Block a user