Skip to content

Commit

Permalink
fix XSS in timeline (#567)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 authored Sep 22, 2023
1 parent 30f65f1 commit 376ff32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/DebugBar/Resources/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,8 @@ if (typeof(PhpDebugBar) == 'undefined') {
$.each(aggregate, function(i, aggregate) {
width = Math.min((aggregate.data.duration * 100 / data.duration).toFixed(2), 100);

aggregateTable.append('<tr><td class="' + csscls('name') + '">' + aggregate.data.count + ' x ' + aggregate.label + ' (' + width + '%)</td><td class="' + csscls('value') + '">' +
aggregateTable.append('<tr><td class="' + csscls('name') + '">' +
aggregate.data.count + ' x ' + $('<i />').text(aggregate.label).html() + ' (' + width + '%)</td><td class="' + csscls('value') + '">' +
'<div class="' + csscls('measure') +'">' +
'<span class="' + csscls('value') + '"></span>' +
'<span class="' + csscls('label') + '">' + formatDuration(aggregate.data.duration) + (aggregate.data.memory ? '/' + formatBytes(aggregate.data.memory) : '') + '</span>' +
Expand Down

0 comments on commit 376ff32

Please sign in to comment.