Skip to content

Commit

Permalink
actual working version of vulnerable components part 5
Browse files Browse the repository at this point in the history
  • Loading branch information
zubcevic authored and nbaars committed Apr 8, 2020
1 parent e25f7a7 commit e921fb6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@

define(['jquery',
'libs/jquery-vuln',
'jqueryuivuln',
'underscore',
'backbone',
'goatApp/controller/LessonController',
'goatApp/controller/MenuController',
'goatApp/view/LessonContentView',
'goatApp/view/MenuView',
'goatApp/view/TitleView'
], function (jquery,
jqueryvuln,
], function ($,
$vuln,
jqueryui,
_,
Backbone,
LessonController,
Expand All @@ -24,17 +26,17 @@ define(['jquery',
TitleView) {

function getContentElement() {
return jquery('#main-content');
return $('#main-content');
};

function render(view) {
jquery('div.pages').hide();
$('div.pages').hide();
//TODO this works for now because we only have one page we should rewrite this a bit
if (view != null) {
jquery('#report-card-page').show();
$('#report-card-page').show();
} else {
jquery('#lesson-title').show();
jquery('#lesson-page').show();
$('#lesson-title').show();
$('#lesson-page').show();
}
};

Expand All @@ -56,8 +58,8 @@ define(['jquery',
titleView: null,

setUpCustomJS: function () {
webgoat.customjs.jquery = jquery; //passing jquery into custom js scope ... still klunky, but works for now
webgoat.customjs.jqueryVuln = jqueryvuln;//ui;//$vuln;
webgoat.customjs.jquery = $; //passing jquery into custom js scope ... still klunky, but works for now
webgoat.customjs.jqueryVuln = $vuln;

// shim to support xss lesson
webgoat.customjs.phoneHome = function (e) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var jQuery = require('jquery');
var jQuery = require('libs/jquery-vuln');

/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
Expand Down
1 change: 1 addition & 0 deletions webgoat-container/src/main/resources/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ require.config({
baseUrl: "js/",
paths: {
jquery: 'libs/jquery.min',
jqueryuivuln: 'libs/jquery-ui-1.10.4',
jqueryui: 'libs/jquery-ui.min',
underscore: 'libs/underscore-min',
backbone: 'libs/backbone-min',
Expand Down

0 comments on commit e921fb6

Please sign in to comment.