mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 23:09:17 +02:00
Fix #758: Ensure all our ActivityPub fetches are authenticated
This commit is contained in:
parent
0cec13a78e
commit
da3710ff08
10 changed files with 40 additions and 12 deletions
|
@ -61,7 +61,7 @@ def slugify_username(username):
|
|||
|
||||
|
||||
def retrieve_ap_object(
|
||||
fid, actor=None, serializer_class=None, queryset=None, apply_instance_policies=True
|
||||
fid, actor, serializer_class=None, queryset=None, apply_instance_policies=True
|
||||
):
|
||||
from . import activity
|
||||
|
||||
|
@ -104,6 +104,6 @@ def retrieve_ap_object(
|
|||
raise exceptions.BlockedActorOrDomain()
|
||||
if not serializer_class:
|
||||
return data
|
||||
serializer = serializer_class(data=data)
|
||||
serializer = serializer_class(data=data, context={"fetch_actor": actor})
|
||||
serializer.is_valid(raise_exception=True)
|
||||
return serializer.save()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue