mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-23 10:01:04 +00:00
Fixes logic error in checking sender
This commit is contained in:
parent
8ec93398ce
commit
e8d1c04712
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")
|
user_agent = request.headers.get("User-Agent")
|
||||||
if not user_agent:
|
if not user_agent:
|
||||||
return False
|
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.groups()
|
||||||
return models.FederatedServer.is_blocked(url)
|
return models.FederatedServer.is_blocked(url)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue