2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-12 07:54:14 +00:00

Merge pull request from GHSA-fr2w-mp56-g4xp

* Enforce file download for attachments table(s)

* Enforce file download for attachment in 'StockItemTestResult' table
This commit is contained in:
Oliver
2022-06-15 18:31:56 +10:00
committed by GitHub
parent 0759c3769e
commit 76aa3a75f2
3 changed files with 11 additions and 3 deletions

View File

@ -1358,7 +1358,8 @@ function loadStockTestResultsTable(table, options) {
var html = value;
if (row.attachment) {
html += `<a href='${row.attachment}'><span class='fas fa-file-alt float-right'></span></a>`;
var text = `<span class='fas fa-file-alt float-right'></span>`;
html += renderLink(text, row.attachment, {download: true});
}
return html;