Allow Updates by every actor on the same origin

This commit is contained in:
Tusooa Zhu 2022-05-29 11:36:00 -04:00
commit 547def67a7
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
2 changed files with 26 additions and 2 deletions

View file

@ -51,7 +51,9 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.UpdateValidator do
with actor = get_field(cng, :actor),
object = get_field(cng, :object),
{:ok, object_id} <- ObjectValidators.ObjectID.cast(object),
true <- actor == object_id do
actor_uri <- URI.parse(actor),
object_uri <- URI.parse(object_id),
true <- actor_uri.host == object_uri.host do
cng
else
_e ->