mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-23 01:51:08 +00:00
Merge pull request #932 from bookwyrm-social/inbox-error
Fixes logic error in checking sender
This commit is contained in:
commit
5f17b0f1e4
1 changed files with 4 additions and 1 deletions
|
@ -70,7 +70,10 @@ def is_blocked_user_agent(request):
|
|||
user_agent = request.headers.get("User-Agent")
|
||||
if not user_agent:
|
||||
return False
|
||||
url = re.search(r"https?://{:s}/?".format(regex.domain), user_agent).group()
|
||||
url = re.search(r"https?://{:s}/?".format(regex.domain), user_agent)
|
||||
if not url:
|
||||
return False
|
||||
url = url.group()
|
||||
return models.FederatedServer.is_blocked(url)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue