Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to set configuration parameters via URL parameters #14326

Closed
rudolphi opened this issue Nov 29, 2021 · 2 comments
Closed

Add option to set configuration parameters via URL parameters #14326

rudolphi opened this issue Nov 29, 2021 · 2 comments

Comments

@rudolphi
Copy link

e.g. viewer.html?isEvalSupported=false&enableScripting=false&file=xyz.pdf
Being able to disable any Javascript execution would really be appreciated, as we may not be able to control whether PDFs are coming from a trusted source.

@Snuffleupagus
Copy link
Collaborator

Please note that controlling viewer features using hash parameters was purposely disabled, see issue #4954 for additional information.

Given the lack of information here, please remember to always fill out the ISSUE_TEMPLATE completely when opening an issue, it's somewhat difficult to understand the scope of this question.
However, please note that in Firefox you can always set preferences using about:config (search for "pdfjs.") and if you're using the default viewer in a custom implementation then either modifying the code or using the AppOptions/Preferences should work; please also see https://github.com/mozilla/pdf.js/wiki/Third-party-viewer-usage

@calixteman
Copy link
Contributor

@rudolphi, if you found any issues with JS execution, please file bugs.
For your information, executed JS in pdf.js is not executed JS in Acrobat (at least in old version of Acrobat).
In Firefox, the JS code is executed within a sandbox with the lowest privileges (there are access neither to I/O, nor to window, nor to document...), consequently it's very secure (you can read this answer from a member of the security team @mozilla: https://security.stackexchange.com/a/248985).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants