N°3949 - Fix XSS vulnerability on file attribute

This commit is contained in:
Molkobain
2021-05-10 10:23:56 +02:00
parent dc36b4648d
commit 85aac7bf52

View File

@@ -31,6 +31,11 @@ class DownloadPage extends AjaxPage
header($s_header);
}
echo $this->sContent;
if (($this->sContentType == 'text/html') && ($this->sContentDisposition == 'inline')) {
// inline content != attachment && html => filter all scripts for malicious XSS scripts
echo self::FilterXSS($this->sContent);
} else {
echo $this->sContent;
}
}
}