From 5cbf7bbc7151b5051d6e7faf4fc165a6b8a21d0a Mon Sep 17 00:00:00 2001 From: D Anzorge Date: Fri, 9 Apr 2021 04:53:18 +0200 Subject: [PATCH 1/4] Ensure EMAIL_USE_TLS is read as a bool --- bookwyrm/settings.py | 2 +- celerywyrm/settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index 845f81c46..52dbc2b20 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -24,7 +24,7 @@ EMAIL_HOST = env("EMAIL_HOST") EMAIL_PORT = env("EMAIL_PORT", 587) EMAIL_HOST_USER = env("EMAIL_HOST_USER") EMAIL_HOST_PASSWORD = env("EMAIL_HOST_PASSWORD") -EMAIL_USE_TLS = env("EMAIL_USE_TLS", True) +EMAIL_USE_TLS = env.bool("EMAIL_USE_TLS", True) DEFAULT_FROM_EMAIL = "admin@{:s}".format(env("DOMAIN")) # Build paths inside the project like this: os.path.join(BASE_DIR, ...) diff --git a/celerywyrm/settings.py b/celerywyrm/settings.py index 7591163b1..7947cb1c4 100644 --- a/celerywyrm/settings.py +++ b/celerywyrm/settings.py @@ -20,7 +20,7 @@ EMAIL_HOST = env("EMAIL_HOST") EMAIL_PORT = env("EMAIL_PORT") EMAIL_HOST_USER = env("EMAIL_HOST_USER") EMAIL_HOST_PASSWORD = env("EMAIL_HOST_PASSWORD") -EMAIL_USE_TLS = env("EMAIL_USE_TLS") +EMAIL_USE_TLS = env.bool("EMAIL_USE_TLS") # Build paths inside the project like this: os.path.join(BASE_DIR, ...) From a52729daaef316f0d675f0323df0e685261fbf4b Mon Sep 17 00:00:00 2001 From: tofuwabohu Date: Fri, 9 Apr 2021 13:28:58 +0200 Subject: [PATCH 2/4] adds SSL params --- bookwyrm/settings.py | 1 + celerywyrm/settings.py | 1 + 2 files changed, 2 insertions(+) diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index 52dbc2b20..146d4fff4 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -25,6 +25,7 @@ EMAIL_PORT = env("EMAIL_PORT", 587) EMAIL_HOST_USER = env("EMAIL_HOST_USER") EMAIL_HOST_PASSWORD = env("EMAIL_HOST_PASSWORD") EMAIL_USE_TLS = env.bool("EMAIL_USE_TLS", True) +EMAIL_USE_SSL = env.bool("EMAIL_USE_SSL", False) DEFAULT_FROM_EMAIL = "admin@{:s}".format(env("DOMAIN")) # Build paths inside the project like this: os.path.join(BASE_DIR, ...) diff --git a/celerywyrm/settings.py b/celerywyrm/settings.py index 7947cb1c4..a9f46f086 100644 --- a/celerywyrm/settings.py +++ b/celerywyrm/settings.py @@ -21,6 +21,7 @@ EMAIL_PORT = env("EMAIL_PORT") EMAIL_HOST_USER = env("EMAIL_HOST_USER") EMAIL_HOST_PASSWORD = env("EMAIL_HOST_PASSWORD") EMAIL_USE_TLS = env.bool("EMAIL_USE_TLS") +EMAIL_USE_SSL = env.bool("EMAIL_USE_SSL") # Build paths inside the project like this: os.path.join(BASE_DIR, ...) From 8bd73df26be3e1e2e8524bffef8b6ddc85e01d4c Mon Sep 17 00:00:00 2001 From: tofuwabohu Date: Fri, 9 Apr 2021 13:37:35 +0200 Subject: [PATCH 3/4] Sets SSL to false per default for tests --- .env.example | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.example b/.env.example index cf3705af0..2397a5b15 100644 --- a/.env.example +++ b/.env.example @@ -36,3 +36,4 @@ EMAIL_PORT=587 EMAIL_HOST_USER=mail@your.domain.here EMAIL_HOST_PASSWORD=emailpassword123 EMAIL_USE_TLS=true +EMAIL_USE_SSL=false From 890346f51b8ffa32f486d306340713b6ed9aa20c Mon Sep 17 00:00:00 2001 From: tofuwabohu Date: Fri, 9 Apr 2021 18:56:21 +0200 Subject: [PATCH 4/4] Adds default value in celerywyrm --- celerywyrm/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/celerywyrm/settings.py b/celerywyrm/settings.py index a9f46f086..952fe5b15 100644 --- a/celerywyrm/settings.py +++ b/celerywyrm/settings.py @@ -21,7 +21,7 @@ EMAIL_PORT = env("EMAIL_PORT") EMAIL_HOST_USER = env("EMAIL_HOST_USER") EMAIL_HOST_PASSWORD = env("EMAIL_HOST_PASSWORD") EMAIL_USE_TLS = env.bool("EMAIL_USE_TLS") -EMAIL_USE_SSL = env.bool("EMAIL_USE_SSL") +EMAIL_USE_SSL = env.bool("EMAIL_USE_SSL", False) # Build paths inside the project like this: os.path.join(BASE_DIR, ...)