The Driven feed fetch fails with 403 (server rejects non-browser User-Agent) #2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Fetching The Driven's RSS feed (
https://thedriven.io/feed/) fails with403 Forbiddenfrom yunjin's fetcher, so no articles from that feed are ever imported. The same URL loads fine in a browser, so the feed itself is healthy — the server is rejecting yunjin's requests based on their headers.Findings
Reproduced during the Sept 2026 probe:
httpx.get("https://thedriven.io/feed/")with default headers returns403 Forbidden; the identical request with a browser User-Agent (Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0) returns 200 and the feed parses normally. All 15 other feeds in the FreshRSS OPML fetch fine without the header.Plan of attack
Plan of attack: SSRF guard (WuMing finding, Marvin8 approved option c)
Same branch/PR as the User-Agent fix (#16, still unmerged — the finding is on its diff).
_validate_feed_url()infetcher.py, called before the HTTP request:http/httpsonly, always enforcedsocket.getaddrinfo; block if any resolved address is private, loopback, link-local, reserved, unspecified, or multicast (IPv4-mapped IPv6 unwrapped); fail closed on resolution errorsYUNJIN_ALLOW_PRIVATE_FEED_HOSTStruthy skips the private-range check for LAN feeds (scheme check still enforced)FetchErrorwith a specific messagegetaddrinfomocked (no live network).Resolved by PR #16 (merged as
cdc5e00): browser-like User-Agent for feed fetches withYUNJIN_HTTP_USER_AGENToverride, plus the maintainer-approved SSRF guard (scheme allow-list, private/loopback/link-local blocking withYUNJIN_ALLOW_PRIVATE_FEED_HOSTSopt-out, per-hop redirect re-validation). DNS-rebinding pinning declined as a documented limitation.