You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not want to allow script-src 'eval' in my CSP provider.
Is there any plan to fix ES5 build?
EDIT:
Looks like unpkg is not loading the latest version:
I tried loading https://unpkg.com/pdfjs-dist/es5/build/pdf.worker.js and it defaults to https://unpkg.com/pdfjs-dist@2.4.456/es5/build/pdf.worker.js while it should be https://unpkg.com/pdfjs-dist@2.5.207/es5/build/pdf.worker.js
But even with version 2.5.207 the code base is still using Function Function("r", "regeneratorRuntime = r")(runtime); in line 1325
The text was updated successfully, but these errors were encountered:
Please note #11036 (comment); the "solution" was to provide a non-translated/non-polyfilled build, which obviously won't help the ES5-build unfortunately (but was the best we could do).
Basically, unless there's another way to polyfill async/await this issue unfortunately cannot be fixed.
Configuration:
Steps to reproduce the problem:
https://unpkg.com/pdfjs-dist@2.4.456/es5/build/pdf.worker.js
2.CSP provider reports this as
eval
What is the expected behaviour?
Not to use eval or Function if possible?
What went wrong?
From my CSP provider
The code base is using
Function("r", "regeneratorRuntime = r")(runtime);
at line:1311
The latest version in ES6 is fine:
https://unpkg.com/pdfjs-dist@2.4.456/build/pdf.worker.js
However it is there in ES5 build:
https://unpkg.com/pdfjs-dist@2.4.456/es5/build/pdf.worker.js
I do not want to allow script-src 'eval' in my CSP provider.
Is there any plan to fix ES5 build?
EDIT:
Looks like unpkg is not loading the latest version:
I tried loading
https://unpkg.com/pdfjs-dist/es5/build/pdf.worker.js
and it defaults tohttps://unpkg.com/pdfjs-dist@2.4.456/es5/build/pdf.worker.js
while it should behttps://unpkg.com/pdfjs-dist@2.5.207/es5/build/pdf.worker.js
But even with version 2.5.207 the code base is still using Function
Function("r", "regeneratorRuntime = r")(runtime);
in line1325
The text was updated successfully, but these errors were encountered: