Accept a FreshRSS "Export" .zip directly for OPML import

FreshRSS's Export feature produces a .zip (an .opml.xml plus a starred-
articles .json this app doesn't import) rather than a bare .opml file —
uploading that zip as-is failed with "That file doesn't look like a valid
OPML export" since defusedxml can't parse a zip as XML.

apps.feeds.opml.extract_opml_bytes detects a zip upload and pulls the
.opml/.opml.xml member out of it before parsing; a bare .opml upload is
returned unchanged, so existing behavior is untouched. Verified against
the reporter's actual FreshRSS export (18 feeds across 6 categories) both
directly through extract_opml_bytes/parse_opml and as a real upload
through the running app.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
ksmithandClaude Sonnet 5 committed 2026-10-30 21:45:16 -06:00
1 parent 753ae9efc7
commit f818b11041
6 files changed
+86 -4

No files matched your search

+2
View File
@@ -1,6 +1,8 @@
__pycache__/
*.py[cod]
*.sqlite3
*.sqlite3-journal
celerybeat-schedule
.env
.venv/
venv/