dariusk / rss-to-activitypub

An RSS to ActivityPub converter.
MIT License
560 stars 28 forks source link

Fix compatibility with Mastodon 3.2.1, Pleroma and Misskey #59

Closed umonaca closed 4 years ago

umonaca commented 4 years ago

Mastodon 3.2.1 requires digest to be present in the HTTP header and signature. Without digest, any messages will be rejected with an error message Mastodon requires the Digest header to be signed when doing a POST request, thus leaving the rss-to-activitypub server in an unusable state.

This PR should work with latest version of Mastodon on master branch and the 3.2.1 version, with and without Secure Mode active. (AUTHORIZED_FETCH=true). Note that mastodon.social is neither running 3.2.1 nor the master branch of Mastodon software, but there are many other instances running the latest versions.

dariusk commented 4 years ago

Will this affect compatibility with instances running 3.2.0 or lower?

umonaca commented 4 years ago

No, it won't. Digest verification was not enforced before. I have setup an instance of rss-to-activitypub and it works for: Mastodon <= 3.2.0 mastodon.social Mastodon master branch Mastodon master branch with Secure Mode enabled fedibird.com (which is tracking the master branch, and @noellabo has made a lot of new features)

By the way I have also added an algorithm field for the signature header, in order to be compatible with Misskey. Reference:

  1. https://github.com/syuilo/misskey/issues/6438
  2. https://github.com/noellabo/pub-relay/commit/04bafe414bf8c21d06dfe2db790bb28c532f24a2#diff-925c618b52ff4f1a2a083c718547dc64R103

You can test the compatibility yourself by using my service running at: https://portal.0svc.com

By the way I cannot get the program working with Pleroma and I am watching a related issue here.

umonaca commented 4 years ago

I have finally fixed the compatibility with Pleroma. The cause of the bug is basically the same as here, except that for rss-to-activitypub server, there isn't a Accept header. There is only a Content-Type header which has the value application/json.

hieronymousch commented 4 years ago

I can confirm that I can now successfully follow a RSS actor with Pleroma 1.2

dariusk commented 4 years ago

I've confirmed this works. Thank you so much for the contribution, especially the Pleroma fix that eluded me for so long!

hieronymousch commented 3 years ago

sorry to bother you again with this but it doesn't work any more for me. I get the famous Follower/Following counter update error and I'm unable to follow the rss actor. I'm on the latest version of the code and running pleroma 2.2.0 (Yunohost master)