Merge pull request #188 from dougmorato/master
Fixining all the javadoc issues preventing the release
This commit is contained in:
commit
61d8e20b09
@ -412,6 +412,7 @@ public class HammerHead extends HttpServlet {
|
|||||||
*
|
*
|
||||||
* @param s Description of the Parameter
|
* @param s Description of the Parameter
|
||||||
* @param screen a {@link org.owasp.webgoat.session.Screen} object.
|
* @param screen a {@link org.owasp.webgoat.session.Screen} object.
|
||||||
|
* @param screen a {@link org.owasp.webgoat.session.Screen} object.
|
||||||
* @param response Description of the Parameter
|
* @param response Description of the Parameter
|
||||||
* @exception IOException Description of the Exception
|
* @exception IOException Description of the Exception
|
||||||
* @throws java.io.IOException if any.
|
* @throws java.io.IOException if any.
|
||||||
|
@ -41,9 +41,7 @@ public class WebGoatServletListener implements ServletContextListener {
|
|||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(HammerHead.class);
|
private static final Logger logger = LoggerFactory.getLogger(HammerHead.class);
|
||||||
|
|
||||||
/**
|
/** {@inheritDoc} */
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void contextInitialized(ServletContextEvent sce) {
|
public void contextInitialized(ServletContextEvent sce) {
|
||||||
ServletContext context = sce.getServletContext();
|
ServletContext context = sce.getServletContext();
|
||||||
@ -80,9 +78,7 @@ public class WebGoatServletListener implements ServletContextListener {
|
|||||||
new PluginsLoader(Paths.get(pluginPath), Paths.get(targetPath)).loadPlugins();
|
new PluginsLoader(Paths.get(pluginPath), Paths.get(targetPath)).loadPlugins();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** {@inheritDoc} */
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void contextDestroyed(ServletContextEvent sce) {
|
public void contextDestroyed(ServletContextEvent sce) {
|
||||||
ServletContext context = sce.getServletContext();
|
ServletContext context = sce.getServletContext();
|
||||||
|
@ -233,6 +233,8 @@ public abstract class AbstractLesson extends Screen implements Comparable<Object
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>getSubmitMethod</p>
|
* <p>getSubmitMethod</p>
|
||||||
|
*
|
||||||
|
* @return a {@link java.lang.String} object.
|
||||||
*/
|
*/
|
||||||
public abstract String getSubmitMethod();
|
public abstract String getSubmitMethod();
|
||||||
|
|
||||||
@ -653,6 +655,8 @@ public abstract class AbstractLesson extends Screen implements Comparable<Object
|
|||||||
* Unlike getLink() this method does not require rendering the output of
|
* Unlike getLink() this method does not require rendering the output of
|
||||||
* the request to the link in order to execute the servlet's method with
|
* the request to the link in order to execute the servlet's method with
|
||||||
* conventional HTTP query parameters.
|
* conventional HTTP query parameters.
|
||||||
|
*
|
||||||
|
* @return a {@link java.lang.String} object.
|
||||||
*/
|
*/
|
||||||
public String getServletLink() {
|
public String getServletLink() {
|
||||||
StringBuffer link = new StringBuffer("attack");
|
StringBuffer link = new StringBuffer("attack");
|
||||||
|
@ -153,6 +153,8 @@ public abstract class LessonAdapter extends AbstractLesson {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* provide a default submitMethod of lesson does not implement
|
* provide a default submitMethod of lesson does not implement
|
||||||
|
*
|
||||||
|
* @return a {@link java.lang.String} object.
|
||||||
*/
|
*/
|
||||||
public String getSubmitMethod() {
|
public String getSubmitMethod() {
|
||||||
return "GET";
|
return "GET";
|
||||||
|
@ -3,7 +3,8 @@ package org.owasp.webgoat.lessons;
|
|||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
|
||||||
/***************************************************************************************************
|
/**
|
||||||
|
*************************************************************************************************
|
||||||
* This file is part of WebGoat, an Open Web Application Security Project utility. For details,
|
* This file is part of WebGoat, an Open Web Application Security Project utility. For details,
|
||||||
* please see http://www.owasp.org/
|
* please see http://www.owasp.org/
|
||||||
* <p>
|
* <p>
|
||||||
@ -26,8 +27,10 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
* Source for this application is maintained at https://github.com/WebGoat/WebGoat, a repository for free software
|
* Source for this application is maintained at https://github.com/WebGoat/WebGoat, a repository for free software
|
||||||
* projects.
|
* projects.
|
||||||
* <p>
|
* <p>
|
||||||
|
*
|
||||||
* @author Nanne Baars
|
* @author Nanne Baars
|
||||||
* @created December 12, 2015
|
* @since December 12, 2015
|
||||||
|
* @version $Id: $Id
|
||||||
*/
|
*/
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface LessonServletMapping {
|
public @interface LessonServletMapping {
|
||||||
|
@ -14,6 +14,7 @@ import org.owasp.webgoat.session.WebSession;
|
|||||||
* <p>Abstract RandomLessonAdapter class.</p>
|
* <p>Abstract RandomLessonAdapter class.</p>
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public abstract class RandomLessonAdapter extends LessonAdapter
|
public abstract class RandomLessonAdapter extends LessonAdapter
|
||||||
{
|
{
|
||||||
@ -30,6 +31,7 @@ public abstract class RandomLessonAdapter extends LessonAdapter
|
|||||||
*
|
*
|
||||||
* @param s a {@link org.owasp.webgoat.session.WebSession} object.
|
* @param s a {@link org.owasp.webgoat.session.WebSession} object.
|
||||||
* @param stage a {@link java.lang.String} object.
|
* @param stage a {@link java.lang.String} object.
|
||||||
|
* @param stage a {@link java.lang.String} object.
|
||||||
*/
|
*/
|
||||||
public void setStage(WebSession s, String stage)
|
public void setStage(WebSession s, String stage)
|
||||||
{
|
{
|
||||||
@ -65,6 +67,7 @@ public abstract class RandomLessonAdapter extends LessonAdapter
|
|||||||
*
|
*
|
||||||
* @param s a {@link org.owasp.webgoat.session.WebSession} object.
|
* @param s a {@link org.owasp.webgoat.session.WebSession} object.
|
||||||
* @param stage a {@link java.lang.String} object.
|
* @param stage a {@link java.lang.String} object.
|
||||||
|
* @param stage a {@link java.lang.String} object.
|
||||||
*/
|
*/
|
||||||
public void setStageComplete(WebSession s, String stage)
|
public void setStageComplete(WebSession s, String stage)
|
||||||
{
|
{
|
||||||
@ -100,6 +103,7 @@ public abstract class RandomLessonAdapter extends LessonAdapter
|
|||||||
*
|
*
|
||||||
* @param s a {@link org.owasp.webgoat.session.WebSession} object.
|
* @param s a {@link org.owasp.webgoat.session.WebSession} object.
|
||||||
* @param stage a {@link java.lang.String} object.
|
* @param stage a {@link java.lang.String} object.
|
||||||
|
* @param stage a {@link java.lang.String} object.
|
||||||
* @return a boolean.
|
* @return a boolean.
|
||||||
*/
|
*/
|
||||||
public boolean isStageComplete(WebSession s, String stage)
|
public boolean isStageComplete(WebSession s, String stage)
|
||||||
|
@ -13,6 +13,7 @@ import org.owasp.webgoat.session.WebSession;
|
|||||||
* <p>Abstract SequentialLessonAdapter class.</p>
|
* <p>Abstract SequentialLessonAdapter class.</p>
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public abstract class SequentialLessonAdapter extends LessonAdapter
|
public abstract class SequentialLessonAdapter extends LessonAdapter
|
||||||
{
|
{
|
||||||
@ -22,6 +23,7 @@ public abstract class SequentialLessonAdapter extends LessonAdapter
|
|||||||
*
|
*
|
||||||
* @param s a {@link org.owasp.webgoat.session.WebSession} object.
|
* @param s a {@link org.owasp.webgoat.session.WebSession} object.
|
||||||
* @param stage a int.
|
* @param stage a int.
|
||||||
|
* @param stage a int.
|
||||||
*/
|
*/
|
||||||
public void setStage(WebSession s, int stage)
|
public void setStage(WebSession s, int stage)
|
||||||
{
|
{
|
||||||
|
@ -84,7 +84,7 @@ public class MenuToLessonMapperScreen extends LessonAdapter
|
|||||||
/**
|
/**
|
||||||
* <p>getDefaultRanking.</p>
|
* <p>getDefaultRanking.</p>
|
||||||
*
|
*
|
||||||
* @return a {@link Integer} object.
|
* @return a {@link java.lang.Integer} object.
|
||||||
*/
|
*/
|
||||||
protected Integer getDefaultRanking()
|
protected Integer getDefaultRanking()
|
||||||
{
|
{
|
||||||
|
@ -33,6 +33,7 @@ package org.owasp.webgoat.lessons.model;
|
|||||||
* use for more complex lessons.
|
* use for more complex lessons.
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class HttpBasicsModel {
|
public class HttpBasicsModel {
|
||||||
|
|
||||||
|
@ -4,6 +4,12 @@ import org.owasp.webgoat.lessons.AbstractLesson;
|
|||||||
import org.owasp.webgoat.lessons.Category;
|
import org.owasp.webgoat.lessons.Category;
|
||||||
import org.owasp.webgoat.session.WebSession;
|
import org.owasp.webgoat.session.WebSession;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>LessonInfoModel class.</p>
|
||||||
|
*
|
||||||
|
* @author dm
|
||||||
|
* @version $Id: $Id
|
||||||
|
*/
|
||||||
public class LessonInfoModel {
|
public class LessonInfoModel {
|
||||||
|
|
||||||
private String lessonTitle;
|
private String lessonTitle;
|
||||||
@ -13,6 +19,11 @@ public class LessonInfoModel {
|
|||||||
private boolean hasPlan;
|
private boolean hasPlan;
|
||||||
private String submitMethod;
|
private String submitMethod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Constructor for LessonInfoModel.</p>
|
||||||
|
*
|
||||||
|
* @param webSession a {@link org.owasp.webgoat.session.WebSession} object.
|
||||||
|
*/
|
||||||
public LessonInfoModel(WebSession webSession) {
|
public LessonInfoModel(WebSession webSession) {
|
||||||
AbstractLesson lesson = webSession.getCurrentLesson();
|
AbstractLesson lesson = webSession.getCurrentLesson();
|
||||||
//TODO make these first class citizens of the lesson itself; and stop passing the session all over ... and generally tighten the checks up
|
//TODO make these first class citizens of the lesson itself; and stop passing the session all over ... and generally tighten the checks up
|
||||||
@ -36,26 +47,56 @@ public class LessonInfoModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GETTERS
|
// GETTERS
|
||||||
|
/**
|
||||||
|
* <p>Getter for the field <code>lessonTitle</code>.</p>
|
||||||
|
*
|
||||||
|
* @return a {@link java.lang.String} object.
|
||||||
|
*/
|
||||||
public String getLessonTitle() {
|
public String getLessonTitle() {
|
||||||
return lessonTitle;
|
return lessonTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Getter for the field <code>numberHints</code>.</p>
|
||||||
|
*
|
||||||
|
* @return a int.
|
||||||
|
*/
|
||||||
public int getNumberHints() {
|
public int getNumberHints() {
|
||||||
return numberHints;
|
return numberHints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>isHasSource.</p>
|
||||||
|
*
|
||||||
|
* @return a boolean.
|
||||||
|
*/
|
||||||
public boolean isHasSource() {
|
public boolean isHasSource() {
|
||||||
return hasSource;
|
return hasSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>isHasSolution.</p>
|
||||||
|
*
|
||||||
|
* @return a boolean.
|
||||||
|
*/
|
||||||
public boolean isHasSolution() {
|
public boolean isHasSolution() {
|
||||||
return hasSolution;
|
return hasSolution;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>isHasPlan.</p>
|
||||||
|
*
|
||||||
|
* @return a boolean.
|
||||||
|
*/
|
||||||
public boolean isHasPlan() {
|
public boolean isHasPlan() {
|
||||||
return hasPlan;
|
return hasPlan;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Getter for the field <code>submitMethod</code>.</p>
|
||||||
|
*
|
||||||
|
* @return a {@link java.lang.String} object.
|
||||||
|
*/
|
||||||
public String getSubmitMethod() {
|
public String getSubmitMethod() {
|
||||||
return submitMethod;
|
return submitMethod;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ import static org.owasp.webgoat.plugins.PluginFileUtils.replaceInFiles;
|
|||||||
* <p>Plugin class.</p>
|
* <p>Plugin class.</p>
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class Plugin {
|
public class Plugin {
|
||||||
|
|
||||||
@ -34,6 +35,11 @@ public class Plugin {
|
|||||||
private List<File> pluginFiles = Lists.newArrayList();
|
private List<File> pluginFiles = Lists.newArrayList();
|
||||||
private File lessonSourceFile;
|
private File lessonSourceFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>findLesson.</p>
|
||||||
|
*
|
||||||
|
* @param classes a {@link java.util.List} object.
|
||||||
|
*/
|
||||||
public void findLesson(List<String> classes) {
|
public void findLesson(List<String> classes) {
|
||||||
for (String clazzName : classes) {
|
for (String clazzName : classes) {
|
||||||
findLesson(clazzName);
|
findLesson(clazzName);
|
||||||
@ -56,6 +62,11 @@ public class Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>loadFiles.</p>
|
||||||
|
*
|
||||||
|
* @param file a {@link java.nio.file.Path} object.
|
||||||
|
*/
|
||||||
public void loadFiles(Path file) {
|
public void loadFiles(Path file) {
|
||||||
if (fileEndsWith(file, ".html") && hasParentDirectoryWithName(file, NAME_LESSON_SOLUTION_DIRECTORY)) {
|
if (fileEndsWith(file, ".html") && hasParentDirectoryWithName(file, NAME_LESSON_SOLUTION_DIRECTORY)) {
|
||||||
solutionLanguageFiles.put(file.getParent().getFileName().toString(), file.toFile());
|
solutionLanguageFiles.put(file.getParent().getFileName().toString(), file.toFile());
|
||||||
|
@ -17,12 +17,23 @@ import java.util.zip.ZipFile;
|
|||||||
/**
|
/**
|
||||||
* Extract the jar file and place them in the system temp directory in the folder webgoat and collect the files
|
* Extract the jar file and place them in the system temp directory in the folder webgoat and collect the files
|
||||||
* and classes.
|
* and classes.
|
||||||
|
*
|
||||||
|
* @author dm
|
||||||
|
* @version $Id: $Id
|
||||||
*/
|
*/
|
||||||
public class PluginExtractor {
|
public class PluginExtractor {
|
||||||
|
|
||||||
private final List<String> classes = Lists.newArrayList();
|
private final List<String> classes = Lists.newArrayList();
|
||||||
private final List<Path> files = new ArrayList<>();
|
private final List<Path> files = new ArrayList<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>extractJarFile.</p>
|
||||||
|
*
|
||||||
|
* @param archive a {@link java.io.File} object.
|
||||||
|
* @param targetDirectory a {@link java.io.File} object.
|
||||||
|
* @return a {@link org.owasp.webgoat.plugins.Plugin} object.
|
||||||
|
* @throws java.io.IOException if any.
|
||||||
|
*/
|
||||||
public Plugin extractJarFile(final File archive, final File targetDirectory) throws IOException {
|
public Plugin extractJarFile(final File archive, final File targetDirectory) throws IOException {
|
||||||
ZipFile zipFile = new ZipFile(archive);
|
ZipFile zipFile = new ZipFile(archive);
|
||||||
Plugin plugin = new Plugin();
|
Plugin plugin = new Plugin();
|
||||||
@ -88,10 +99,20 @@ public class PluginExtractor {
|
|||||||
return targetFile;
|
return targetFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Getter for the field <code>classes</code>.</p>
|
||||||
|
*
|
||||||
|
* @return a {@link java.util.List} object.
|
||||||
|
*/
|
||||||
public List<String> getClasses() {
|
public List<String> getClasses() {
|
||||||
return this.classes;
|
return this.classes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Getter for the field <code>files</code>.</p>
|
||||||
|
*
|
||||||
|
* @return a {@link java.util.List} object.
|
||||||
|
*/
|
||||||
public List<Path> getFiles() {
|
public List<Path> getFiles() {
|
||||||
return this.files;
|
return this.files;
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ import java.util.Collection;
|
|||||||
* <p>PluginFileUtils class.</p>
|
* <p>PluginFileUtils class.</p>
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class PluginFileUtils {
|
public class PluginFileUtils {
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ package org.owasp.webgoat.plugins;
|
|||||||
* <p>PluginLoadingFailure class.</p>
|
* <p>PluginLoadingFailure class.</p>
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class PluginLoadingFailure extends RuntimeException {
|
public class PluginLoadingFailure extends RuntimeException {
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ import java.util.concurrent.Executors;
|
|||||||
* <p>PluginsLoader class.</p>
|
* <p>PluginsLoader class.</p>
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class PluginsLoader {
|
public class PluginsLoader {
|
||||||
|
|
||||||
|
@ -55,6 +55,8 @@ public class LabelDebugService extends BaseService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reload all the plugins
|
* Reload all the plugins
|
||||||
|
*
|
||||||
|
* @return a {@link org.springframework.http.ResponseEntity} object.
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/debug/labels.mvc")
|
@RequestMapping(value = "/debug/labels.mvc")
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
|
@ -16,10 +16,22 @@ import org.springframework.web.bind.annotation.ResponseStatus;
|
|||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
|
/**
|
||||||
|
* <p>LessonInfoService class.</p>
|
||||||
|
*
|
||||||
|
* @author dm
|
||||||
|
* @version $Id: $Id
|
||||||
|
*/
|
||||||
public class LessonInfoService extends BaseService {
|
public class LessonInfoService extends BaseService {
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(LessonMenuService.class);
|
private static final Logger logger = LoggerFactory.getLogger(LessonMenuService.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>getLessonInfo.</p>
|
||||||
|
*
|
||||||
|
* @param session a {@link javax.servlet.http.HttpSession} object.
|
||||||
|
* @return a {@link org.owasp.webgoat.lessons.model.LessonInfoModel} object.
|
||||||
|
*/
|
||||||
@RequestMapping(value = "/lessoninfo.mvc", produces = "application/json")
|
@RequestMapping(value = "/lessoninfo.mvc", produces = "application/json")
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
LessonInfoModel getLessonInfo(HttpSession session) {
|
LessonInfoModel getLessonInfo(HttpSession session) {
|
||||||
@ -27,6 +39,12 @@ public class LessonInfoService extends BaseService {
|
|||||||
return new LessonInfoModel(webSession);
|
return new LessonInfoModel(webSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>handleException.</p>
|
||||||
|
*
|
||||||
|
* @param ex a {@link java.lang.Exception} object.
|
||||||
|
* @return a {@link java.lang.String} object.
|
||||||
|
*/
|
||||||
@ExceptionHandler(Exception.class)
|
@ExceptionHandler(Exception.class)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR)
|
@ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR)
|
||||||
@ -34,6 +52,12 @@ public class LessonInfoService extends BaseService {
|
|||||||
return "An error occurred retrieving the LessonInfoModel:" + ex.getMessage();
|
return "An error occurred retrieving the LessonInfoModel:" + ex.getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>getLessonInfoModel.</p>
|
||||||
|
*
|
||||||
|
* @param webSession a {@link org.owasp.webgoat.session.WebSession} object.
|
||||||
|
* @return a {@link org.owasp.webgoat.lessons.model.LessonInfoModel} object.
|
||||||
|
*/
|
||||||
protected LessonInfoModel getLessonInfoModel(WebSession webSession) {
|
protected LessonInfoModel getLessonInfoModel(WebSession webSession) {
|
||||||
return new LessonInfoModel(webSession);
|
return new LessonInfoModel(webSession);
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|||||||
* <p>LessonTitleService class.</p>
|
* <p>LessonTitleService class.</p>
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class LessonTitleService extends BaseService {
|
public class LessonTitleService extends BaseService {
|
||||||
|
|
||||||
|
@ -56,7 +56,8 @@ public class PluginReloadService extends BaseService {
|
|||||||
/**
|
/**
|
||||||
* Reload all the plugins
|
* Reload all the plugins
|
||||||
*
|
*
|
||||||
* @param session a {@link HttpSession} object.
|
* @param session a {@link javax.servlet.http.HttpSession} object.
|
||||||
|
* @return a {@link org.springframework.http.ResponseEntity} object.
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/reloadplugins.mvc")
|
@RequestMapping(value = "/reloadplugins.mvc")
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
|
@ -35,6 +35,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
* for free software projects.
|
* for free software projects.
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class Controller extends HttpServlet {
|
public class Controller extends HttpServlet {
|
||||||
|
|
||||||
|
@ -32,6 +32,9 @@ import java.util.Map;
|
|||||||
* projects.
|
* projects.
|
||||||
*
|
*
|
||||||
* * @version $Id: $Id
|
* * @version $Id: $Id
|
||||||
|
*
|
||||||
|
* @author dm
|
||||||
|
* @version $Id: $Id
|
||||||
*/
|
*/
|
||||||
public class Authorization
|
public class Authorization
|
||||||
{
|
{
|
||||||
|
@ -322,6 +322,11 @@ public class Course {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>loadLessonFromPlugin.</p>
|
||||||
|
*
|
||||||
|
* @param context a {@link javax.servlet.ServletContext} object.
|
||||||
|
*/
|
||||||
public void loadLessonFromPlugin(ServletContext context) {
|
public void loadLessonFromPlugin(ServletContext context) {
|
||||||
logger.debug("Loading plugins into cache");
|
logger.debug("Loading plugins into cache");
|
||||||
String pluginPath = context.getRealPath("plugin_lessons");
|
String pluginPath = context.getRealPath("plugin_lessons");
|
||||||
|
@ -141,6 +141,14 @@ public class DatabaseUtilities
|
|||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
* @param resultsMetaData
|
* @param resultsMetaData
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
|
* @param resultsMetaData
|
||||||
|
* Description of the Parameter
|
||||||
|
* @param resultsMetaData
|
||||||
|
* Description of the Parameter
|
||||||
|
* @param resultsMetaData
|
||||||
|
* Description of the Parameter
|
||||||
|
* @param resultsMetaData
|
||||||
|
* Description of the Parameter
|
||||||
* @return Description of the Return Value
|
* @return Description of the Return Value
|
||||||
* @exception IOException
|
* @exception IOException
|
||||||
* Description of the Exception
|
* Description of the Exception
|
||||||
|
@ -560,6 +560,12 @@ public class ECSFactory
|
|||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
* @param selected
|
* @param selected
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
|
* @param selected
|
||||||
|
* Description of the Parameter
|
||||||
|
* @param selected
|
||||||
|
* Description of the Parameter
|
||||||
|
* @param selected
|
||||||
|
* Description of the Parameter
|
||||||
* @param name
|
* @param name
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
* @param options
|
* @param options
|
||||||
@ -568,6 +574,8 @@ public class ECSFactory
|
|||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
* @param selected
|
* @param selected
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
|
* @param selected
|
||||||
|
* Description of the Parameter
|
||||||
* @return Description of the Return Value
|
* @return Description of the Return Value
|
||||||
*/
|
*/
|
||||||
public static Element makeSelect(boolean diffNames, Select select, String name, Vector<Option> options,
|
public static Element makeSelect(boolean diffNames, Select select, String name, Vector<Option> options,
|
||||||
@ -586,6 +594,12 @@ public class ECSFactory
|
|||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
* @param selected
|
* @param selected
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
|
* @param selected
|
||||||
|
* Description of the Parameter
|
||||||
|
* @param selected
|
||||||
|
* Description of the Parameter
|
||||||
|
* @param selected
|
||||||
|
* Description of the Parameter
|
||||||
* @param name
|
* @param name
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
* @param options
|
* @param options
|
||||||
@ -594,6 +608,8 @@ public class ECSFactory
|
|||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
* @param selected
|
* @param selected
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
|
* @param selected
|
||||||
|
* Description of the Parameter
|
||||||
* @param rowsShowing
|
* @param rowsShowing
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
* @return Description of the Return Value
|
* @return Description of the Return Value
|
||||||
|
@ -3,15 +3,27 @@ package org.owasp.webgoat.session;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* <p>LabelDebugger class.</p>
|
||||||
|
*
|
||||||
|
* @author dm
|
||||||
|
* @version $Id: $Id
|
||||||
*/
|
*/
|
||||||
public class LabelDebugger implements Serializable {
|
public class LabelDebugger implements Serializable {
|
||||||
|
|
||||||
private boolean isEnabled = false;
|
private boolean isEnabled = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>isEnabled.</p>
|
||||||
|
*
|
||||||
|
* @return a boolean.
|
||||||
|
*/
|
||||||
public boolean isEnabled() {
|
public boolean isEnabled() {
|
||||||
return isEnabled;
|
return isEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>enable.</p>
|
||||||
|
*/
|
||||||
public void enable() {
|
public void enable() {
|
||||||
this.isEnabled = true;
|
this.isEnabled = true;
|
||||||
}
|
}
|
||||||
|
@ -200,6 +200,14 @@ public class LessonTracker
|
|||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
* @param screen
|
* @param screen
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
|
* @param screen
|
||||||
|
* Description of the Parameter
|
||||||
|
* @param screen
|
||||||
|
* Description of the Parameter
|
||||||
|
* @param screen
|
||||||
|
* Description of the Parameter
|
||||||
|
* @param screen
|
||||||
|
* Description of the Parameter
|
||||||
* @param s
|
* @param s
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
* @return Description of the Return Value
|
* @return Description of the Return Value
|
||||||
@ -335,6 +343,7 @@ public class LessonTracker
|
|||||||
* @param s
|
* @param s
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
* @param screen a {@link org.owasp.webgoat.session.Screen} object.
|
* @param screen a {@link org.owasp.webgoat.session.Screen} object.
|
||||||
|
* @param screen a {@link org.owasp.webgoat.session.Screen} object.
|
||||||
*/
|
*/
|
||||||
public void store(WebSession s, Screen screen)
|
public void store(WebSession s, Screen screen)
|
||||||
{
|
{
|
||||||
@ -347,6 +356,7 @@ public class LessonTracker
|
|||||||
* @param s
|
* @param s
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
* @param screen a {@link org.owasp.webgoat.session.Screen} object.
|
* @param screen a {@link org.owasp.webgoat.session.Screen} object.
|
||||||
|
* @param screen a {@link org.owasp.webgoat.session.Screen} object.
|
||||||
* @param user a {@link java.lang.String} object.
|
* @param user a {@link java.lang.String} object.
|
||||||
*/
|
*/
|
||||||
public void store(WebSession s, Screen screen, String user)
|
public void store(WebSession s, Screen screen, String user)
|
||||||
|
@ -28,6 +28,7 @@ package org.owasp.webgoat.session;
|
|||||||
* projects.
|
* projects.
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class Parameter implements Comparable
|
public class Parameter implements Comparable
|
||||||
{
|
{
|
||||||
|
@ -10,6 +10,7 @@ import java.util.Properties;
|
|||||||
* <p>RandomLessonTracker class.</p>
|
* <p>RandomLessonTracker class.</p>
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class RandomLessonTracker extends LessonTracker
|
public class RandomLessonTracker extends LessonTracker
|
||||||
{
|
{
|
||||||
|
@ -4,6 +4,7 @@ package org.owasp.webgoat.session;
|
|||||||
* <p>Role class.</p>
|
* <p>Role class.</p>
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class Role {
|
public class Role {
|
||||||
private String rolename;
|
private String rolename;
|
||||||
|
@ -8,6 +8,7 @@ import java.util.Properties;
|
|||||||
* <p>SequentialLessonTracker class.</p>
|
* <p>SequentialLessonTracker class.</p>
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class SequentialLessonTracker extends LessonTracker
|
public class SequentialLessonTracker extends LessonTracker
|
||||||
{
|
{
|
||||||
|
@ -28,6 +28,7 @@ package org.owasp.webgoat.session;
|
|||||||
* projects.
|
* projects.
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class UnauthenticatedException extends Exception
|
public class UnauthenticatedException extends Exception
|
||||||
{
|
{
|
||||||
|
@ -28,6 +28,7 @@ package org.owasp.webgoat.session;
|
|||||||
* projects.
|
* projects.
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class UnauthorizedException extends Exception
|
public class UnauthorizedException extends Exception
|
||||||
{
|
{
|
||||||
|
@ -7,6 +7,7 @@ import java.util.Iterator;
|
|||||||
* <p>User class.</p>
|
* <p>User class.</p>
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class User {
|
public class User {
|
||||||
private String username;
|
private String username;
|
||||||
|
@ -172,6 +172,8 @@ public class UserTracker
|
|||||||
* @param screen
|
* @param screen
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
* @return The lessonTracker value
|
* @return The lessonTracker value
|
||||||
|
* @param screen
|
||||||
|
* Description of the Parameter
|
||||||
* @param s a {@link org.owasp.webgoat.session.WebSession} object.
|
* @param s a {@link org.owasp.webgoat.session.WebSession} object.
|
||||||
*/
|
*/
|
||||||
public LessonTracker getLessonTracker(WebSession s, Screen screen)
|
public LessonTracker getLessonTracker(WebSession s, Screen screen)
|
||||||
@ -183,6 +185,7 @@ public class UserTracker
|
|||||||
* <p>getLessonTracker.</p>
|
* <p>getLessonTracker.</p>
|
||||||
*
|
*
|
||||||
* @param s a {@link org.owasp.webgoat.session.WebSession} object.
|
* @param s a {@link org.owasp.webgoat.session.WebSession} object.
|
||||||
|
* @param screen a {@link org.owasp.webgoat.session.Screen} object.
|
||||||
* @param user a {@link java.lang.String} object.
|
* @param user a {@link java.lang.String} object.
|
||||||
* @param screen a {@link org.owasp.webgoat.session.Screen} object.
|
* @param screen a {@link org.owasp.webgoat.session.Screen} object.
|
||||||
* @return a {@link org.owasp.webgoat.session.LessonTracker} object.
|
* @return a {@link org.owasp.webgoat.session.LessonTracker} object.
|
||||||
@ -208,6 +211,8 @@ public class UserTracker
|
|||||||
* @param screen
|
* @param screen
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
* @return The status value
|
* @return The status value
|
||||||
|
* @param screen
|
||||||
|
* Description of the Parameter
|
||||||
* @param s a {@link org.owasp.webgoat.session.WebSession} object.
|
* @param s a {@link org.owasp.webgoat.session.WebSession} object.
|
||||||
*/
|
*/
|
||||||
public String getStatus(WebSession s, Screen screen)
|
public String getStatus(WebSession s, Screen screen)
|
||||||
@ -267,6 +272,14 @@ public class UserTracker
|
|||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
* @param screen
|
* @param screen
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
|
* @param screen
|
||||||
|
* Description of the Parameter
|
||||||
|
* @param screen
|
||||||
|
* Description of the Parameter
|
||||||
|
* @param screen
|
||||||
|
* Description of the Parameter
|
||||||
|
* @param screen
|
||||||
|
* Description of the Parameter
|
||||||
* @param s
|
* @param s
|
||||||
* Description of the Parameter
|
* Description of the Parameter
|
||||||
*/
|
*/
|
||||||
|
@ -28,6 +28,7 @@ package org.owasp.webgoat.session;
|
|||||||
* projects.
|
* projects.
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class ValidationException extends Exception
|
public class ValidationException extends Exception
|
||||||
{
|
{
|
||||||
|
@ -9,6 +9,7 @@ import javax.servlet.http.HttpServlet;
|
|||||||
* <p>WebgoatContext class.</p>
|
* <p>WebgoatContext class.</p>
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class WebgoatContext {
|
public class WebgoatContext {
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ import java.util.Properties;
|
|||||||
* for free software projects.
|
* for free software projects.
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class WebgoatProperties extends Properties {
|
public class WebgoatProperties extends Properties {
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ import org.springframework.stereotype.Component;
|
|||||||
* free software projects.
|
* free software projects.
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class BeanProvider implements ApplicationContextAware
|
public class BeanProvider implements ApplicationContextAware
|
||||||
|
@ -32,6 +32,7 @@ import java.util.Map;
|
|||||||
* projects.
|
* projects.
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class HtmlEncoder
|
public class HtmlEncoder
|
||||||
{
|
{
|
||||||
|
@ -31,6 +31,7 @@ import java.util.Locale;
|
|||||||
* free software projects.
|
* free software projects.
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public interface LabelManager
|
public interface LabelManager
|
||||||
{
|
{
|
||||||
|
@ -36,6 +36,7 @@ import java.util.Locale;
|
|||||||
* free software projects.
|
* free software projects.
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
@Component("labelManager")
|
@Component("labelManager")
|
||||||
public class LabelManagerImpl implements LabelManager, Serializable
|
public class LabelManagerImpl implements LabelManager, Serializable
|
||||||
|
@ -44,6 +44,7 @@ import java.util.Locale;
|
|||||||
* for free software projects.
|
* for free software projects.
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
@Singleton
|
@Singleton
|
||||||
|
@ -11,6 +11,7 @@ import org.owasp.webgoat.session.WebgoatContext;
|
|||||||
* <p>WebGoatI18N class.</p>
|
* <p>WebGoatI18N class.</p>
|
||||||
*
|
*
|
||||||
* @version $Id: $Id
|
* @version $Id: $Id
|
||||||
|
* @author dm
|
||||||
*/
|
*/
|
||||||
public class WebGoatI18N
|
public class WebGoatI18N
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user