diff --git a/src/routes/activitypub/activity.rs b/src/routes/activitypub/activity.rs index 864f86a3..3b6358f8 100644 --- a/src/routes/activitypub/activity.rs +++ b/src/routes/activitypub/activity.rs @@ -12,7 +12,10 @@ pub async fn view( ) -> crate::Result> { let aid = ctx.uri("activities", id); if auth.is_local() && query.fetch && !ctx.is_local(&aid) { - ctx.fetch_activity(&aid).await?; + let obj = ctx.fetch_activity(&aid).await?; + if obj.id != aid { + return Err(UpubError::Redirect(obj.id)); + } } let row = model::addressing::Entity::find_addressed()