From ac2ef667aff282e8273c92ec339a011d41c51aa2 Mon Sep 17 00:00:00 2001 From: Joachim Date: Sun, 1 Jan 2023 19:57:10 +0100 Subject: [PATCH] Fix error when no referer --- bookwyrm/utils/validate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/utils/validate.py b/bookwyrm/utils/validate.py index 0c0f01f06..a6272319b 100644 --- a/bookwyrm/utils/validate.py +++ b/bookwyrm/utils/validate.py @@ -4,7 +4,7 @@ from bookwyrm.settings import DOMAIN, USE_HTTPS def validate_url_domain(url, default="/"): """Basic check that the URL starts with the instance domain name""" - if url in ("/", default): + if url in ("/", default, None): return url protocol = "https://" if USE_HTTPS else "http://"