Repository navigation
Conversation
ViewerJS bundled pdf.js 1.1.114 (CVE-2018-5158, CVE-2024-4367) and loads any URL after the '#', so a link alone ran script on the Odoo origin. PDFs now go to /web/static/lib/pdfjs, ViewerJS keeps ODF and refuses other origins. Claude-Session: https://claude.ai/code/session_01BtuusZvm1PH6BFsRBeP3iH
The panel loads previewUrl, which 20.0's mail attachments do not carry, so its iframe opened 'undefined'. Titles read attachment.filename, which 20.0 calls name. Claude-Session: https://claude.ai/code/session_01BtuusZvm1PH6BFsRBeP3iH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #20. Two fixes on top of the 20.0 port:
#. Odoo serves it without a login, so a link alone ran script on the Odoo origin. PDFs now open in core's/web/static/lib/pdfjsviewer, which checks the file's origin. ViewerJS's pdf.js files are deleted, its PDF plugin entry is removed, andviewerjs_tweaks.jsdrops any document from another origin before ViewerJS'sonloadreads the hash.previewUrl, which 20.0's mail attachments don't carry, so its iframe openedundefined. Titles readattachment.filename, which 20.0 callsname.Checked in a browser on the prod image:
ViewerJS/pdf.jsreturns 404;index.html#https://…and#//…make no request off-origin;https://claude.ai/code/session_01BtuusZvm1PH6BFsRBeP3iH