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

Mastodon authorize URL doesn't work with special characters in Group name #46

Open gunchleoc opened 2 years ago

gunchleoc commented 2 years ago

Dear devs,

not sure if this is a Guppe or Mastodon bug. Please let me know if this is the wrong repo and I'll repost on Mastodon.

I have created a group at https://a.gup.pe/u/g%C3%A0idhlig

I then tried to authorize with gunchleoc@mastodon.scot, which results in a link:

https://mastodon.scot/authorize_interaction?uri=g%C3%A0idhlig@a.gup.pe

Result: Blank-looking page with lots of code in the debug console

wmurphyrd commented 2 years ago

Thanks for the report. Mastodon is returning "Unprocessable Entity" on that itneract page.

I can see in guppe's logs that Mastodon finds the actor and fetches information about it (profile, inbox, outbox, et c)

I think it might be my fault as I can see in some of those later requests guppe is inconsistent in how it represents the accented character:

{
   "@context" : [
      "https://www.w3.org/ns/activitystreams",
      "https://w3id.org/security/v1"
   ],
   "id" : "https://a.gup.pe/u/g%C3%A0idhlig/followers?page=true",
   "orderedItems" : [],
   "partOf" : "https://a.gup.pe/u/gàidhlig/followers",
   "type" : "OrderedCollectionPage"
}

This probably fails some validation check in Mastodon.