Skip to content

Commit

Permalink
Show a message on clicking its header. Fixes the CSRF lesson, except …
Browse files Browse the repository at this point in the history
…that the task does not mention clicking the message and the solution shows an incorrect img URL. Comment #43.
  • Loading branch information
ilatypov committed Oct 30, 2015
1 parent 285d467 commit c7d5a78
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/webapp/js/goatUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,13 @@ goat.utils = {
var url = $(el).attr('href');
$(el).unbind('click').attr('href','#').attr('link',url);
//TODO pull currentMenuId
$(el).click(function() {
$(el).click(function(event) {
event.preventDefault();
var _url = $(el).attr('link');
$.get(_url, {success:showResponse});
console.log("About to GET " + _url);
$.get(_url)
.done(function(response) {$('#lesson_content').html(response);})
.fail(function() {alert("failed a GET " + _url);});
}
);
});
Expand Down

2 comments on commit c7d5a78

@ilatypov
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I set up my vim to soft tabs and I see that the file had hard tabs.

@mayhew64
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put this same fix, if applicable, in the 7.x WebGoat-Lessons? Also did you test on multiple browsers, mainly Safari, Firefox, and Chrome?

Please sign in to comment.