Skip to content

Commit

Permalink
🔒 fixed another stored XSS vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
faburem committed Jun 8, 2022
1 parent e606b67 commit c1fff7e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions imports/utils/frontend_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ function getUserSetting(field) {

function addToolTipToTableCell(value) {
if (value) {
const sanitizedValue = $('<div/>').text(value).html()
return `<span class="js-tooltip" data-bs-toggle="tooltip" data-bs-placement="left" title='${sanitizedValue}'>${sanitizedValue}</span>`
const toolTipElement = $('<span/>').text(value)
toolTipElement.addClass('js-tooltip')
toolTipElement.attr('data-bs-toggle', 'tooltip')
toolTipElement.attr('data-bs-placement', 'left')
toolTipElement.attr('title', toolTipElement.text())
return toolTipElement.get(0).outerHTML
}
return ''
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "titra",
"version": "0.77.0",
"version": "0.77.1",
"private": true,
"scripts": {
"start": "meteor run"
Expand Down

0 comments on commit c1fff7e

Please sign in to comment.