mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 19:09:17 +02:00
Fix #1999: broken federation with pods using allow-listing
This commit is contained in:
parent
e309e93d3b
commit
641e1525ac
5 changed files with 23 additions and 4 deletions
|
@ -46,15 +46,14 @@ class SignatureAuthentication(authentication.BaseAuthentication):
|
|||
domain = urllib.parse.urlparse(actor_url).hostname
|
||||
allowed = models.Domain.objects.filter(name=domain, allowed=True).exists()
|
||||
if not allowed:
|
||||
logger.debug("Actor domain %s is not on allow-list", domain)
|
||||
raise exceptions.BlockedActorOrDomain()
|
||||
|
||||
try:
|
||||
actor = actors.get_actor(actor_url)
|
||||
except Exception as e:
|
||||
logger.info(
|
||||
"Discarding HTTP request from blocked actor/domain %s, %s",
|
||||
actor_url,
|
||||
str(e),
|
||||
"Discarding HTTP request from actor/domain %s, %s", actor_url, str(e),
|
||||
)
|
||||
raise rest_exceptions.AuthenticationFailed(
|
||||
"Cannot fetch remote actor to authenticate signature"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue