server: redirected fetch does not work #288
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Example:
you are on
yourself.example
, for some reason seeing a post onsomething.example
that is actually fromauthor.example
. At least with Misskey & Co. you should be able to copy thesomething.example
link (since it HTTP redirects the activitypub representation toauthor.example
) to get your instance to fetch the post fromauthor.example
).However there seems to be a problem with this as whenever I tried this it caused a different bug for every
author.example
replacement I tried. Here are some example log lines with errors:mk.absturztau.be
was used assomething.example
andchaos.social
asauthor.example
)The error
invalid response
that e.g. jeder was seeing will still occur with the above patch. The "problem" is that in the resolver we check that the thing we actually got has theid
we asked for.// Did we actually get the object that corresponds to the canonical URL?
// Does the host we requested stuff from actually correspond to the host that owns the activity?
|| !(getApId(object) == null || getApId(object) === value)
This check was previously done separately in the kernel in different places, see
3582fd8260
. The check itself is necessary, otherwise people could change data that is "owned" by different hosts that they are not authorized to change.Maybe that commit needs to be rolled back and the respective checks reinstated (e.g.
ef53ec276a
). Another solution would be to signal to the resolver that a redirect to a different URL or even host would be okay in the case of when it is used byap/show
(and default to such a redirect not being okay otherwise).With the latest two commits, redirected fetch works for me.