Merge branch 'develop' of https://github.com/WebGoat/WebGoat into develop

This commit is contained in:
mayhew64
2017-01-28 11:05:16 -05:00
33 changed files with 416 additions and 32 deletions

View File

@ -82,7 +82,7 @@ public class Course {
* @return a {@link java.util.List} object.
*/
public List<AbstractLesson> getLessons(Category category) {
return this.lessons.stream().filter(l -> l.getCategory() == category).collect(toList());
return this.lessons.stream().filter(l -> l.getCategory() == category).sorted().collect(toList());
}
public void setLessons(List<AbstractLesson> lessons) {

View File

@ -1,5 +1,15 @@
define(['jquery', 'underscore', 'backbone', 'polyglot', 'goatApp/view/GoatRouter', 'goatApp/support/goatAsyncErrorHandler'],
function ($, _, Backbone, Polyglot, Router, asyncErrorHandler) {
define(['jquery',
'underscore',
'backbone',
'polyglot',
'goatApp/view/GoatRouter',
'goatApp/support/goatAsyncErrorHandler'],
function ($,
_,
Backbone,
Polyglot,
Router,
asyncErrorHandler) {
'use strict'
return {
initApp: function () {

View File

@ -1,4 +1,5 @@
define(['jquery',
'libs/jquery-vuln',
'underscore',
'backbone',
'goatApp/controller/LessonController',
@ -8,6 +9,7 @@ define(['jquery',
'goatApp/view/DeveloperControlsView',
'goatApp/view/TitleView'
], function ($,
$vuln,
_,
Backbone,
LessonController,
@ -48,6 +50,7 @@ define(['jquery',
setUpCustomJS: function () {
webgoat.customjs.jquery = $; //passing jquery into custom js scope ... still klunky, but works for now
webgoat.customjs.jqueryVuln = $vuln;
// temporary shim to support dom-xss lesson
webgoat.customjs.phoneHome = function (e) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,9 @@
// AMD (Asynchronous Module Definition) wrapper for jQuery 1.8
define([
// Load the jQuery source file
'/WebGoat/js/libs/jquery-2.2.4.min.js'
],
function(){
// Tell Require.js that this module returns a reference to jQuery
return $; // Return the global scope object
});

View File

@ -0,0 +1,9 @@
// AMD (Asynchronous Module Definition) wrapper for jQuery 1.8
define([
// Load the jQuery source file
'/WebGoat/js/libs/jquery-2.1.4.min.js'
],
function(){
// Tell Require.js that this module returns a reference to jQuery
return $.noConflict(true); // Return the global scope object
});

View File

@ -13,13 +13,19 @@ js/main.js << main file for require.js
require.config({
baseUrl: "js/",
paths: {
jquery: 'libs/jquery-1.10.2.min',
jquery: 'libs/jquery-2.2.4.min',
underscore: 'libs/underscore-min',
backbone: 'libs/backbone-min',
text: 'libs/text',
templates: 'goatApp/templates',
polyglot: 'libs/polyglot.min'
},
map: {
'libs/jquery-base' : {'jquery':'libs/jquery-2.2.4.min'},
'libs/jquery-vuln' : {'jquery':'libs/jquery-2.1.4.min'}
},
shim: {
underscore: {
exports: "_"
@ -31,6 +37,6 @@ require.config({
}
});
require(['jquery','underscore','backbone','goatApp/goatApp'], function($,_,Backbone,Goat){
Goat.initApp();
require(['jquery','libs/jquery-base','libs/jquery-vuln','underscore','backbone','goatApp/goatApp'], function($,jqueryBase,jqueryVuln,_,Backbone,Goat){
Goat.initApp();
});