Fix potential cross-site scripting vulnerability in plugins.js in the UI

This commit is contained in:
Théophile Diot 2023-09-28 11:41:22 +01:00
parent ece5ce1cdf
commit c0816bb119
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06

View file

@ -333,9 +333,10 @@ class Upload {
: (fileSize = (loaded / (1024 * 1024)).toFixed(2) + " MB");
const progressHTML = this.fileLoad(name, fileSize);
let cleanHTML = DOMPurify.sanitize(progressHTML);
this.uploadedArea.classList.add("onprogress");
this.progressArea.innerHTML = progressHTML;
this.progressArea.innerHTML = cleanHTML;
});
xhr.addEventListener("readystatechange", () => {