mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 06:49:24 +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
|
@ -703,12 +703,12 @@ class Upload(models.Model):
|
|||
|
||||
objects = UploadQuerySet.as_manager()
|
||||
|
||||
def download_audio_from_remote(self, user):
|
||||
def download_audio_from_remote(self, actor):
|
||||
from funkwhale_api.common import session
|
||||
from funkwhale_api.federation import signing
|
||||
|
||||
if user.is_authenticated and user.actor:
|
||||
auth = signing.get_auth(user.actor.private_key, user.actor.private_key_id)
|
||||
if actor:
|
||||
auth = signing.get_auth(actor.private_key, actor.private_key_id)
|
||||
else:
|
||||
auth = None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue