mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
Security: Correctly disable eval in pdfjs (#6702)
This commit is contained in:
parent
ac666df4ce
commit
7983487430
@ -35,7 +35,6 @@ import type {
|
|||||||
import { PDFSinglePageViewer } from 'pdfjs-dist/web/pdf_viewer'
|
import { PDFSinglePageViewer } from 'pdfjs-dist/web/pdf_viewer'
|
||||||
|
|
||||||
PDFJS['verbosity'] = PDFJS.VerbosityLevel.ERRORS
|
PDFJS['verbosity'] = PDFJS.VerbosityLevel.ERRORS
|
||||||
PDFJS['isEvalSupported'] = false
|
|
||||||
|
|
||||||
export enum RenderTextMode {
|
export enum RenderTextMode {
|
||||||
DISABLED,
|
DISABLED,
|
||||||
@ -440,6 +439,7 @@ export class PdfViewerComponent
|
|||||||
cMapPacked: true,
|
cMapPacked: true,
|
||||||
enableXfa: true,
|
enableXfa: true,
|
||||||
}
|
}
|
||||||
|
params.isEvalSupported = false
|
||||||
|
|
||||||
if (srcType === 'string') {
|
if (srcType === 'string') {
|
||||||
params.url = this.src
|
params.url = this.src
|
||||||
|
Loading…
x
Reference in New Issue
Block a user