Conversation
Email feed items had `<link>mailto:<message-id></link>`, which Capacitor / WebView-based RSS readers (e.g. Cubic, Current, FocusReader) reject as "URL is not allowed" or "unsupported or unsafe URL". Browsers and the Miniflux web UI happily handled it, hiding the issue. Instead, write a self-contained HTML page per email under public/feeds/<feedId>/<sha256-of-msgid>.html (already served by Hono's static handler) and use that as the item's <link>: - Absolute URL when SERVER_URL is configured, relative otherwise. - <guid> stays the Message-ID (unchanged), so reader read-state is preserved across the upgrade. - Per-item HTML body is sanitized (drops script/style/iframe/object/ embed/form/base/meta/svg/etc., strips on* event handlers and javascript:/vbscript:/non-image-data: URLs) and the page sets a strict Content-Security-Policy meta tag and referrer no-referrer. - Stale per-item HTML files are pruned, but only AFTER the new feed XML has been written, via a deferred commit() callback returned from buildRSSFromEmailFolder. This avoids leaving the on-disk XML pointing at files we just deleted if the XML write fails. - feedId is validated as a safe path component (defense-in-depth; in practice it is always a uuidv4 from the main process).
Fix IMAP feed <link>: replace mailto: with per-item HTML page
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.
No description provided.