zenhack / ttrss-sandstorm

Sandstorm port of Tiny Tiny RSS
GNU General Public License v3.0
6 stars 2 forks source link

If you put the wrong URL in the powerbox you can't ever subscribe to that domain. #24

Open griff opened 3 years ago

griff commented 3 years ago

When subscribing to a URL and you in the powerbox click "Specify URL.." and then specify anything other than the root URL of the feed you will get weird errors you can't recover from.

It won't successfully subscribe and you can't try and subscribe to that feed again (it will just return 404 with no new powerbox).

The worst part is that it will also do this when you paste the full feed URL into the powerbox.

The only way I have found around this is to make a new grain.

ocdtrekkie commented 3 years ago

This is unfortunately a "feature" in that it's intended to let you redirect any app to talk to a different server than it was intended. If you want to avoid your grain talking to a given server, being able to force it to talk to another one is great.

But the big thing missing is the UI to remove these Powerbox capabilities. I think Ian is working on a grain settings panel that could enable this from the Sandstorm side.

On the TTRSS side, maybe the proxy can be more flexible to allow re-redirecting this if it errors out on a feed request?

zenhack commented 3 years ago

Really the "right" thing would be tighter integration with the app itself, so in addition to not displaying a duplicate prompt for the URL, it would drop the cap when you delete the feed. But that's major surgery, since it would mean making changes to ttrss directly instead of using powerbox-http-proxy.

I'm not sure what the best approach is short of doing that, but as @ocdtrekkie says, once we have a UI for revoking capabilities from a grain, you could use that to force it to try to re-acquire a capability.

zenhack commented 3 years ago

(Alternatively, if you clone the grain, the new grain will not have any capabilities, and so will re-request everything...)

griff commented 3 years ago

@zenhack since ttrss does have plugins I would say that the ideal would be having the plugin architecture be general enough that all sandstorm specific functionality could live solely as a ttrss plugin.

griff commented 3 years ago

@zenhack there is actually a plugin hook called hook_unsubscribe_feed which suggests that a plugin can be notified when a feed gets unsubscribed from.

zenhack commented 3 years ago

Hm, so I suppose then that we could add a feature to the proxy to tell it to drop caps, and then include a plugin for ttrss that triggers this on unsubscribe. Seems simple enough. I haven't dug into the plugin architecture for TTRSS at all.

Quoting Brian Olsen (2021-03-02 19:53:12)

[1]@zenhack there is actually a plugin hook called hook_unsubscribe_feed which suggests that a plugin can be notified when a feed gets unsubscribed from.

-- You are receiving this because you were mentioned. Reply to this email directly, [2]view it on GitHub, or [3]unsubscribe.

Verweise

  1. https://github.com/zenhack
  2. https://github.com/zenhack/ttrss-sandstorm/issues/24#issuecomment-789338773
  3. https://github.com/notifications/unsubscribe-auth/AAGXYPWHDZD3CMBMQEHBDGDTBWB7RANCNFSM4YP6CD4A
zenhack commented 3 years ago

I opened an issue for the powerbox-http-proxy feature: https://github.com/zenhack/powerbox-http-proxy/issues/8

griff commented 3 years ago

@zenhack this wouldn't fix my exact issue here though since when triggering this problem I don't get to a successfully added subscription in ttrss and so I have nothing to unsubscribe.

But maybe we could add some other logic to a plugin that would solve my issue: Something like if a powebox cap was added but no hook_subscribe_feed was ever called within a time limit drop the cap again.

zenhack commented 3 years ago

I suppose we could add a background task that periodically scanned the DB for caps for domains that don't have any matching feeds (though there's a race condition that we need to be careful with here where a token could get deleted between being created and having the feed added to the DB...)