Got "Specified URL seems to be invalid" when subscribing to an internal RSS feed

Describe the problem you’re having:

When subscribing to a RSS feed with URL like this: http://rsshub_service.rsshub_1/blogs/blablabla, I got an error Specified URL seems to be invalid.

A brief explaination on the werid URL, I run ttrss in a docker container, and adds it to a network where a custom service rsshub is running. rsshub is a service that scrapes web pages and exported the results in RSS form.

I start getting this error after I upgraded ttrss to the latest version yesterday, it was working fine before.

After looking into the code, I think the function that gives this error was the validate in urlhelper.php. But I don’t know PHP and couldn’t debug exactly why this isn’t a valid URL.,

Could someone help?

Thanks!

If possible include steps to reproduce the problem:

tt-rss version (including git commit id):

Platform (i.e. Linux distro, PHP, PostgreSQL, etc) versions:

Please provide any additional information below:

Here is some “light” reading material for you:

https://community.tt-rss.org/t/heads-up-several-vulnerabilities-fixed/3799/

It’s a long thread, but it explains everything.

Thanks for the information!

One use case for ttrss(and other rss clients in general) is to serve as a browser for all kinds of information, not necessarily just news or blogs. I have written some small programs that scrape websites or generating some reports and publish those as RSS feeds. Apparently these small programs are best not exposed to public internet.

In the past it’s very convenient to add such feeds to ttrss by assigning hostnames only resolvable in the local network, which is now forbidden. The most obvious way to get this working is to register public domains for these small programs, and let ttrss subscribe via these public domains. Then, configure nginx to allow only ttrss’s IP to access these services. This seems cumbersome.

I’d be very interested to learn what’s the commended setup for this use case…

put your local services on the same docker network with tt-rss, then access them by service (= host) names.

(docker-compose.yml)

services:
   rss-bridge:
....
networks:
  default:
    external:
      name: ttrss-docker_default

if your service uses a non-standard port, make an internal reverse proxy sidecar container for it.

e: i’ve added a faq entry:

https://git.tt-rss.org/fox/tt-rss/wiki/FAQ#i-have-internal-web-services-tt-rss-is-complaining-about-url-is-invalid-loopback-address-disallowed-ports

an example for the simple sidecar reverse proxy could be useful there.

Maybe this link should be added to the error message?