Skip to content

Commit

Permalink
update metrics page js to sanitize query parameter in metrics page URL
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipDeFraties authored and camillevilla committed Nov 28, 2024
1 parent 4ccd27e commit 604bee6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/assets/javascripts/metrics_page.es6
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ $(document).ready(function(){
var pos1 = curUrl.lastIndexOf("?duration");
curUrl = curUrl.substring(0, pos1);
}
let duration = $( "#metrics_duration" ).val();
let duration = encodeURIComponent($("#metrics_duration").val());
let newUrl = `${curUrl}?duration=${duration}`;
debugger
window.location.href = newUrl;
});

Expand Down

0 comments on commit 604bee6

Please sign in to comment.