Skip to content

Commit

Permalink
avoid issues with empty scoreboard (OWASP#724) (OWASP#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
rudosch authored Nov 28, 2022
1 parent 363a1af commit 4651b00
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/webapp/scoreboard.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@
async: false,
success: function(o) {
$("#badData").hide("fast");
if (o == null || o.length == 0) {
$("#leaderboard").empty().append("<h3 style='text-align:center;'>No scoreboard data available yet</h3>");
return;
}
for(i=0;i<o.length;i++) {
if ($('#userbar-'+ o[i].id).length == 0) {
// this id doesn't exist, so add it to our list.
Expand Down

0 comments on commit 4651b00

Please sign in to comment.