addressing false positive jsverify rngState 85f362db8950cea741

pull/593/head
El RIDO 2020-02-05 19:06:45 +01:00
parent aa377038a0
commit 12c83a13c7
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92
1 changed files with 6 additions and 1 deletions

View File

@ -88,7 +88,12 @@ describe('AttachmentViewer', function () {
if (prefix.indexOf('<a') === -1 && postfix.indexOf('<a') === -1) {
result = $('<textarea>').text((prefix + filename + postfix)).text();
} else {
result = prefix + $.PrivateBin.Helper.htmlEntities(filename) + postfix;
result = DOMPurify.sanitize(
prefix + $.PrivateBin.Helper.htmlEntities(filename) + postfix, {
ALLOWED_TAGS: ['a', 'i', 'span'],
ALLOWED_ATTR: ['href', 'id']
}
);
}
if (filename.length) {
results.push(