-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Lack of Restrictions for PDFs #1744
Comments
What potential mitigations do you propose? |
My proposed mitigations range wildly within the following options:
I am not convinced that there is an elegant solution that restricts them to exactly the same functionality as our html/svg pages, but I know that the current state doesn't seem optimal. |
It sounds to me like the 3rd option (sandbox) is the best here:
|
Although it's true that PDFs are unsandboxed, it seems like this is mostly not an issue in practice, especially since they don't apply to the /preview page. |
A continuation on the discussion regarding PDFs
Currently PDFs are not subject to the same restrictions as other MIME types. Specifically, we restrict JS in all other types (HTML and SVG) by the application of CSP. These restrictions greatly inhibit the following (purposefully or otherwise):
I think we can all agree pointers being functional on anything that appears to be on Ordinals.com is detrimental. Currently it is possible to create a PDF that will link (pointers) to outside content, utilize potentially malicious XSS vectors, and/or pull content from other inscriptions without the need to fight the existing CSP. This can all be done in a way that, to casual users, will appear to be a 'standard' inscription.
With that in mind, I feel that my assessment of this being "outside the sandbox" is true unless we say that there is no intent to have a sandbox (at which point the existence of the CSP becomes an oddity).
Towards this, I believe that controls around PDFs are not only reasonable, but necesarry if we wish to remain isolated from Pointers, mitigate (not eliminate) XSS vulnerability, and have structured Recusion on Ord's terms instead of just however users can best circumvent the restrictions. I don't believe any restrictions on Inscribing PDFs is reasonable or justified.
The text was updated successfully, but these errors were encountered: