Closed macgirvin closed 8 months ago
Is there any easy method with which I can reproduce the issue? Can you give me an account on a "streams" instance?
Interesting - I was just making sure my "internet-facing" test server was up to date to give you an account, but it's working fine from there. Yet it is consistently rejected from fediversity.site - which is at the same git commit. So now I wonder if my instance is blocked.
OK, I'm stumped. I've temporarily turned on registration-with-approval for fediversity.site. If you reply here with your email domain (or email me mike@macgirvin.com) I'll keep an eye out for it and approve. I'm on Australia time so apologies if this takes a day or so to happen.
Here are the basic instructions for following somebody....
Once in, you'll be asked to create a channel (your fediverse identity) and then go to your Connections (top menu or hamburger menu) and there will be a widget on the top left (assuming desktop) to add a connection. We accept webfinger or URL. URL seems to be more reliable for the buzzrelay for some as yet unknown reason.
If you go back to /connections and see a red dot on the avatar, the connection hasn't been accepted yet. This sometimes takes a minute, but if it's still red after that, there was either an error returned from the follow or it was rejected.
Then if you Edit the connection (/connedit/xxx), there's a link at the top of the page called 'Connection Tools'. From there you can delete the connection and try again if you need to do so.
@macgirvin Thank you, I signed up using astro@spaceboyz.net
You've been approved.
Your DM went to somebody else but a screenshot was forwarded to me. It appears our hosting provider blocks curl/wget requests to reduce script kiddie attacks. If the relay relies on curl requests to function, this explains why it wasn't working and you can close this issue. I'm told this may be fixed for fediverse hosting clients but haven't yet verified. And personally, I would probably choose to leave the filter turned on, even though it means we would be unable to connect with some relays and bots. But the issue was brought up by one of our members who is possibly using the same provider so I needed to follow through. Thank you for taking the time to look into this.
ActvityPub won't work without those GET requests with header Accept: application/ld+json
. Please have them allowed.
I appreciate you taking the time to discover the problem. However, It was curl and wget that were blocked to prevent script kiddie hacking. It is a default in one of the Linux security libraries and has nothing to do with the streams repository code. You might wish to change the User-agent to something besides the default to avoid being blocked by security libraries in the future, and/or by other service providers.
And since you brought up the Accept header, please read the ActivityPub spec again. Section 3.2.
ActivityPub will not work without
Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"
It is specified as MUST.
This -
Accept: application/ld+json
is only specified as SHOULD. We accept both forms because this is now the 14th fediverse project I've encountered that has gotten it wrong, and I've tired of correcting people. Again, I appreciate all your efforts and please don't take this as a critique. I'm trying to be helpful.
The user-agent is buzzrelay/0.1.0 (+https://relay.fedi.buzz)
Regarding the MIME type the spec says:
Servers SHOULD interpret a Content-Type or Accept header of application/activity+json as equivalent to application/ld+json; profile="https://www.w3.org/ns/activitystreams" for server-to-server interactions.
I am actually using application/activity+json
here. What is your opinion on that?
My apologies for getting activity+json and ld+json confused. I was in a hurry. The point I was trying to make is that
Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"
is the only header that ActivityPub implementations are required to support.
We recognise application/activity+json and application/ld+json and a few other variations. My only goal here is to figure out why following the relay isn't working from some but not all streams sites so that our members stop complaining.
In any case the curl issue has been reported as resolved by my service provider. You should now be able to use if tor testing. If you are only using curl for testing and not for the actual relay and the actual relay is not using curl and we aren't on the blocklist that the relay is using, that still doesn't explain why follow requests to the relay from some (but not all) of our sites are being rejected by the relay.
Have consulted with my service provider and apparently user-agents containing 'fedi.buzz' were being blocked by security policy as there is apparently a content scraper which contains that substring in the user-agent; and the service provider blocks content scrapers by default that do not provide informed consent.
The source of the issue has been identified and following the relay now works correctly. I will close this ticket. Apologies that I was not able to identify the problem source earlier. This wasn't something I could easily ascertain from my end of the connection as it only occurred on inbound requests, which never arrived at our application.
Thank you for following up on this problem.
Following tags used to work from streams. Now the Follow activity is consistently bounced with a 400 error. Activity follows: