From 83b4c50b89ee9adc1b2c469144f218f45021385a Mon Sep 17 00:00:00 2001 From: lawson89 <> Date: Thu, 14 Aug 2014 08:33:56 -0400 Subject: [PATCH] webgoat session was being stored under inconsistent keys in session fixed by using constant names SESSION on WebSession --- webapp/lesson_content.jsp | 4 ++-- webapp/main.jsp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp/lesson_content.jsp b/webapp/lesson_content.jsp index 5f68051c1..771cccca5 100644 --- a/webapp/lesson_content.jsp +++ b/webapp/lesson_content.jsp @@ -2,8 +2,8 @@ import="org.owasp.webgoat.session.*, org.owasp.webgoat.lessons.Category, org.owasp.webgoat.lessons.AbstractLesson, org.owasp.webgoat.util.*, java.util.*" errorPage="" %> <% - Course course = ((Course) session.getAttribute("course")); - WebSession webSession = ((WebSession) session.getAttribute("websession")); + WebSession webSession = ((WebSession) session.getAttribute(WebSession.SESSION)); + Course course = webSession.getCourse(); AbstractLesson currentLesson = webSession.getCurrentLesson(); %> diff --git a/webapp/main.jsp b/webapp/main.jsp index 25cfbb4e6..04dba86ca 100644 --- a/webapp/main.jsp +++ b/webapp/main.jsp @@ -2,8 +2,8 @@ import="org.owasp.webgoat.session.*, org.owasp.webgoat.lessons.Category, org.owasp.webgoat.lessons.AbstractLesson, org.owasp.webgoat.util.*, java.util.*" errorPage="" %> <% - Course course = ((Course) session.getAttribute("course")); - WebSession webSession = ((WebSession) session.getAttribute("websession")); + WebSession webSession = ((WebSession) session.getAttribute(WebSession.SESSION)); + Course course = webSession.getCourse(); AbstractLesson currentLesson = webSession.getCurrentLesson(); %>