immers-space / guppe

Federated social groups with ActivityPub, NodeJS, Express, and Mongodb
https://a.gup.pe
GNU Affero General Public License v3.0
192 stars 16 forks source link

lots of petitions to my instance #95

Closed gabboman closed 1 year ago

gabboman commented 1 year ago

Hello, I have a custom thing called wafrn. The thing is that I've been reciving a lot of petitions from something using this software.

I have added cache on my side, but still I think the problem is worth being fixed

Captura de pantalla 2023-06-20 a las 13 47 07

How can we figure out what could be the reason of this?

The instance that is reciving all the spam is app.wafrn.net, and other times it has been other users than me. Before ading some cache to some routes this put my server on its knees

wmurphyrd commented 1 year ago

well shit that's definitely not right. Guppe should only fetch an object in order to fulfill a request from someone on your instance, and even then it should need to fetch it only once.

wmurphyrd commented 1 year ago

Don't know why it keeps trying to fetch your actor - are you using any sort of alias/redirect on the actor id or key id other than https://app.wafrn.net/fediverse/blog/gabboman? That would prevent guppe finding it in cache and make it fetch again

Also noticing your server is delivering things to guppe that it should not be - totally unrelated posts and likes and such that don't include any guppe groups in the adresses. Does your server think that guppegroups@a.gup.pe is in your followers collection? (that can't be the case as Guppe never sends outgoing Follow activities under any circumstance)

wmurphyrd commented 1 year ago

I think there's two things going on here:

  1. My cache lookup for the actor object is failing to match when there is a hash suffix like #main-key, causing it to refetch the actor on every signed request
  2. Your server is delivering public activities to every single known inbox on the guppe server (we don't implement shared inbox)

So you're flooding guppe with activities it doesn't need and we're flooding you with unnecessary fetches for the signature key