summaryrefslogtreecommitdiffstats
path: root/tests/test_mimeparser.cpp
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-02 17:41:39 +0200
committerDanilo M. <danix@danix.xyz>2026-08-04 12:52:28 +0200
commit5690c50ff9a6ef4555c2c4ccd9a7dbd7dc172c7a (patch)
tree90da159f0ae913ee8f6d1a12ddc0d70faa31183b /tests/test_mimeparser.cpp
parent14843569125f7aeb4adaf547c323c8eb18961461 (diff)
downloadqtmaildir-5690c50ff9a6ef4555c2c4ccd9a7dbd7dc172c7a.tar.gz
qtmaildir-5690c50ff9a6ef4555c2c4ccd9a7dbd7dc172c7a.zip
docs: scope the document-load exemption to an exact URL
The interceptor previously trusted the whole qtmaildir: scheme, so a hostile message body referencing qtmaildir://anything would have been allowed. That made the interceptor's correctness depend on the scheme handler in a different, later task. It now trusts only the exact base URL passed to setHtml() and fails closed when none is set. Records the resulting obligation on MessageView to call setDocumentUrl() with that same URL. Also corrects the attachment path guard to a separator-aware comparison and notes that it is unreachable defence-in-depth: safeFilename() runs first, so no caller-supplied name can reach it. A test driving saveTo() expecting refusal cannot pass; test safeFilename() instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_mimeparser.cpp')
0 files changed, 0 insertions, 0 deletions