From e589396be2e8fcd7efd482cc3f6e7090493a6d36 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 13 Apr 2021 12:15:14 -0700 Subject: [PATCH 1/5] Fixes links from readme to docs --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 90d3ad46b..3b0c2e8be 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ You can request an invite by entering your email address at https://bookwyrm.soc ## Contributing -See [contributing](https://docs.joinbookwyrm.com/contributing.html) for code, translation or monetary contributions. +See [contributing](https://docs.joinbookwyrm.com/how-to-contribute.html) for code, translation or monetary contributions. ## About BookWyrm ### What it is and isn't @@ -82,4 +82,4 @@ Deployment The application is set up to share book and author data between instances, and get book data from arbitrary outside sources. Right now, the only connector is to OpenLibrary, but other connectors could be written. ## Set up Bookwyrm -See the [installation instructions](https://docs.joinbookwyrm.com/developer-environment.html) on how to set up Bookwyrm in developer environment or production. +The documentation website has instruction on how to set up Bookwyrm in [developer environment](https://docs.joinbookwyrm.com/developer-environment.html) or [production](https://docs.joinbookwyrm.com/installing-in-production.html). From df258859fef9909026a506e6bceaece9797ab6ac Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 13 Apr 2021 12:16:19 -0700 Subject: [PATCH 2/5] more links --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3b0c2e8be..5aa927634 100644 --- a/README.md +++ b/README.md @@ -82,4 +82,4 @@ Deployment The application is set up to share book and author data between instances, and get book data from arbitrary outside sources. Right now, the only connector is to OpenLibrary, but other connectors could be written. ## Set up Bookwyrm -The documentation website has instruction on how to set up Bookwyrm in [developer environment](https://docs.joinbookwyrm.com/developer-environment.html) or [production](https://docs.joinbookwyrm.com/installing-in-production.html). +The [documentation website](https://docs.joinbookwyrm.com/) has instruction on how to set up Bookwyrm in [developer environment](https://docs.joinbookwyrm.com/developer-environment.html) or [production](https://docs.joinbookwyrm.com/installing-in-production.html). From 3c82d05b3bafe9f5d825c38f43b317c5b43fc5c2 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 13 Apr 2021 12:17:07 -0700 Subject: [PATCH 3/5] wording fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5aa927634..161f91b94 100644 --- a/README.md +++ b/README.md @@ -82,4 +82,4 @@ Deployment The application is set up to share book and author data between instances, and get book data from arbitrary outside sources. Right now, the only connector is to OpenLibrary, but other connectors could be written. ## Set up Bookwyrm -The [documentation website](https://docs.joinbookwyrm.com/) has instruction on how to set up Bookwyrm in [developer environment](https://docs.joinbookwyrm.com/developer-environment.html) or [production](https://docs.joinbookwyrm.com/installing-in-production.html). +The [documentation website](https://docs.joinbookwyrm.com/) has instruction on how to set up Bookwyrm in a [developer environment](https://docs.joinbookwyrm.com/developer-environment.html) or [production](https://docs.joinbookwyrm.com/installing-in-production.html). From e8d1c04712947a98ba4e43b5dd8759c14d24fcd5 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 13 Apr 2021 18:04:54 -0700 Subject: [PATCH 4/5] Fixes logic error in checking sender --- bookwyrm/views/inbox.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bookwyrm/views/inbox.py b/bookwyrm/views/inbox.py index d1b75997d..4771fe2d7 100644 --- a/bookwyrm/views/inbox.py +++ b/bookwyrm/views/inbox.py @@ -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.groups() return models.FederatedServer.is_blocked(url) From 00c6b7e6e00d1543d99e2c932c7d8f6815cab4f6 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 13 Apr 2021 18:26:54 -0700 Subject: [PATCH 5/5] Fixes regex group --- bookwyrm/views/inbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/views/inbox.py b/bookwyrm/views/inbox.py index 4771fe2d7..a8eb48510 100644 --- a/bookwyrm/views/inbox.py +++ b/bookwyrm/views/inbox.py @@ -73,7 +73,7 @@ def is_blocked_user_agent(request): url = re.search(r"https?://{:s}/?".format(regex.domain), user_agent) if not url: return False - url = url.groups() + url = url.group() return models.FederatedServer.is_blocked(url)