Disable eval for pdfjs [SCI-10680]

This commit is contained in:
Martin Artnik 2024-05-07 14:08:52 +02:00
parent 81e3f16d14
commit a1bb160c70

View file

@ -115,7 +115,7 @@ var PdfPreview = (function() {
function loadPdfDocument(canvas, page = 1) {
var loadingPdf = pdfjsLib.getDocument(canvas.dataset.pdfUrl);
var loadingPdf = pdfjsLib.getDocument({ url: canvas.dataset.pdfUrl, isEvalSupported: false });
$(canvas).data('load-attempts', $(canvas).data('load-attempts') + 1);
loadingPdf.promise
.then(function(pdfDocument) {