mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
fix(Read PDF Node): Disable JS evaluation from PDFs (#9336)
This commit is contained in:
parent
695e762663
commit
c4bf5b2b92
|
@ -7,6 +7,7 @@ import get from 'lodash/get';
|
|||
import iconv from 'iconv-lite';
|
||||
|
||||
import { getDocument as readPDF, version as pdfJsVersion } from 'pdfjs-dist';
|
||||
import type { DocumentInitParameters } from 'pdfjs-dist/types/src/display/api';
|
||||
import { flattenObject } from '@utils/utilities';
|
||||
|
||||
export type JsonToSpreadsheetBinaryFormat = 'csv' | 'html' | 'rtf' | 'ods' | 'xls' | 'xlsx';
|
||||
|
@ -157,7 +158,7 @@ export async function extractDataFromPDF(
|
|||
) {
|
||||
const binaryData = this.helpers.assertBinaryData(itemIndex, binaryPropertyName);
|
||||
|
||||
const params: { password?: string; url?: URL; data?: ArrayBuffer } = { password };
|
||||
const params: DocumentInitParameters = { password, isEvalSupported: false };
|
||||
|
||||
if (binaryData.id) {
|
||||
params.data = await this.helpers.binaryToBuffer(
|
||||
|
|
Loading…
Reference in a new issue