Skip to content

Commit

Permalink
Fix XSS on tasks page
Browse files Browse the repository at this point in the history
  • Loading branch information
nt0xa committed Dec 13, 2016
1 parent 6cc83ed commit 0f2eab3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion flower/static/js/flower.js
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,20 @@ var flower = (function () {
}, {
targets: 4,
data: 'kwargs',
visible: isColumnVisible('kwargs')
visible: isColumnVisible('kwargs'),
render: function (data) {
var entityMap = {
'&': '&',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
'\'': '&#39;',
'/': '&#x2F;'
};
return data.replace(/[&<>"'\/]/g, function (s) {
return entityMap[s];
});
}
}, {
targets: 5,
data: 'result',
Expand Down

0 comments on commit 0f2eab3

Please # to comment.