From 8050bd52c464ac1c17694960f4acc2b34a6868c3 Mon Sep 17 00:00:00 2001
From: Nanne Baars
Date: Sat, 10 Sep 2016 16:14:10 +0200
Subject: [PATCH] Navigation and links are not the same after reboot #194
---
.../owasp/webgoat/lessons/AbstractLesson.java | 81 ++++++++++---------
1 file changed, 43 insertions(+), 38 deletions(-)
diff --git a/webgoat-container/src/main/java/org/owasp/webgoat/lessons/AbstractLesson.java b/webgoat-container/src/main/java/org/owasp/webgoat/lessons/AbstractLesson.java
index 5598af3b1..211d52f9e 100644
--- a/webgoat-container/src/main/java/org/owasp/webgoat/lessons/AbstractLesson.java
+++ b/webgoat-container/src/main/java/org/owasp/webgoat/lessons/AbstractLesson.java
@@ -35,35 +35,37 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import static java.lang.Math.abs;
+
/**
- *************************************************************************************************
- *
- *
+ * ************************************************************************************************
+ *
+ *
* This file is part of WebGoat, an Open Web Application Security Project utility. For details,
* please see http://www.owasp.org/
- *
+ *
* Copyright (c) 2002 - 20014 Bruce Mayhew
- *
+ *
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License along with this program; if
* not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
- *
+ *
* Getting Source ==============
- *
+ *
* Source for this application is maintained at https://github.com/WebGoat/WebGoat, a repository for free software
* projects.
*
* @author Bruce Mayhew WebGoat
- * @since October 28, 2003
* @version $Id: $Id
+ * @since October 28, 2003
*/
public abstract class AbstractLesson extends Screen implements Comparable
*
@@ -383,9 +390,9 @@ public abstract class AbstractLesson extends Screen implements ComparableReturns the default "path" portion of a lesson's URL.
- *
- *
+ *
+ *
* Legacy webgoat lesson links are of the form
* "attack?Screen=Xmenu=Ystage=Z". This method returns the path portion of
* the url, i.e., "attack" in the string above.
- *
+ *
* Newer, Spring-Controller-based classes will override this method to
* return "*.do"-styled paths.
*
@@ -630,7 +637,7 @@ public abstract class AbstractLesson extends Screen implements Comparable
* Rendering the link in the browser may result in Javascript sending
* additional requests to perform necessary actions or to obtain data
* relevant to the lesson or the element of the lesson selected by the
@@ -645,13 +652,13 @@ public abstract class AbstractLesson extends Screen implements Comparable
* 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
* conventional HTTP query parameters.
@@ -662,8 +669,8 @@ public abstract class AbstractLesson extends Screen implements ComparablesetCurrentAction.
*
- * @param s a {@link org.owasp.webgoat.session.WebSession} object.
+ * @param s a {@link org.owasp.webgoat.session.WebSession} object.
* @param lessonScreen a {@link java.lang.String} object.
*/
public abstract void setCurrentAction(WebSession s, String lessonScreen);
@@ -711,7 +718,7 @@ public abstract class AbstractLesson extends Screen implements ComparableSetter for the field lessonPlanFileName.
*
- * @param lang a {@link java.lang.String} object.
+ * @param lang a {@link java.lang.String} object.
* @param lessonPlanFileName a {@link java.lang.String} object.
*/
public void setLessonPlanFileName(String lang, String lessonPlanFileName) {
@@ -999,6 +1006,4 @@ public abstract class AbstractLesson extends Screen implements Comparable