Atom enclosure with relative href is omitted from saved feed message
Categories
(MailNews Core :: Feed Reader, defect)
Tracking
(thunderbird159 affected)
| Tracking | Status | |
|---|---|---|
| thunderbird159 | --- | affected |
People
(Reporter: nguyentuanhung1149, Assigned: mirko)
Details
Attachments
(4 files, 1 external file)
Tested: Thunderbird Daily 159.0a1, build 20261003100540, Linux x86_64; comm-central fd6ee9a9bd64e360a9dbb737e2d0fab4e395fbf0. Reproduced with disposable profiles and localhost-only fixtures.
Steps to reproduce:
- Put the attached atom-relative-enclosure.xml and atom-absolute-enclosure.xml in a directory with the attached notes.txt under a podcast/ subdirectory. Serve the directory with
python3 -m http.server 8765 --bind 127.0.0.1 --directory <directory>. - In a new RSS account, use Feed Subscriptions to add http://127.0.0.1:8765/atom-relative-enclosure.xml.
- Open the saved "Episode" article and inspect its attachment list or message source. Repeat in a separate account with http://127.0.0.1:8765/atom-absolute-enclosure.xml as a control.
Expected:
The Atom rel="enclosure" href="podcast/notes.txt" is a valid relative IRI reference. With no xml:base, it resolves against the feed retrieval URL to http://127.0.0.1:8765/podcast/notes.txt. The stored article should expose that file as an external attachment, as the absolute-URL control does. RFC 4287 §4.2.7 permits IRI references in atom:link href, and RFC 3986 §5.1.3 establishes the retrieval URI as the base when no other base is supplied.
Actual:
The article is stored (one message), but the relative enclosure is silently omitted: no X-Mozilla-External-Attachment-URL header and no multipart MIME body. The absolute control stores one article with exactly one attachment at the expected URL. The local resource itself returns HTTP 200. This reproduced in two independent direct feed downloads and two independent Feed Subscriptions UI runs per fixture. The attached JSON contains the sanitized results. The UI probe invokes the real dialog's addFeed() method; parser and storage are unmodified.
Likely cause:
FeedParser.sys.mjs:1029-1033 sends the raw enclosure href through validLink(), which rejects relative values before they can be resolved. By contrast, the same parser resolves the article's relative alternate link through findAtomLink(). The fixtures use no xml:base, so this is separate from bug 2077757.
Duplicate check:
Bugzilla open/closed Feed Reader summary and comment searches found no exact current Thunderbird report. Bug 714407 reports a similar symptom in the retired Firefox RSS Discovery and Preview product, a different implementation. Bug 682606 concerns malformed relative RSS enclosures stopping processing; here a valid Atom enclosure is silently dropped while the article saves. Bugs 762631 and 955869 concern Atom enclosure support and deduplication, respectively. Bug 1679059 concerns saving an attachment that already appears.
References: https://www.rfc-editor.org/rfc/rfc4287 ; https://www.rfc-editor.org/rfc/rfc3986 ; https://searchfox.org/comm-central/rev/fd6ee9a9bd64e360a9dbb737e2d0fab4e395fbf0/mailnews/extensions/newsblog/FeedParser.sys.mjs
Credit: Nguyen Tuan Hung (nguyentuanhung1149@gmail.com), VNU HCM - UIT
| Reporter | ||
Comment 1•1 month ago
|
||
| Reporter | ||
Comment 2•1 month ago
|
||
| Reporter | ||
Comment 3•1 month ago
|
||
| Reporter | ||
Comment 4•1 month ago
|
||
Comment 5•1 month ago
|
||
(not a new version issue unless determined otherwise by regression testing)
| Assignee | ||
Comment 6•3 days ago
|
||
Updated•3 days ago
|
| Assignee | ||
Updated•3 days ago
|
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/b8e987b58d5c
Resolve relative Atom enclosure URLs against the feed URL r=mkmelin
Description
•