From 162498872748497aea975539d259d479c56560e1 Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Wed, 18 Feb 2026 03:11:54 +0100 Subject: [PATCH] fixed proton bridge self signed certs with skip verification var --- backend/api/email_backend.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/api/email_backend.py b/backend/api/email_backend.py index 24762a9..8abba7f 100644 --- a/backend/api/email_backend.py +++ b/backend/api/email_backend.py @@ -11,8 +11,7 @@ class InsecureEmailBackend(EmailBackend): @property def ssl_context(self): if getattr(settings, 'EMAIL_SKIP_CERT_VERIFICATION', False): - context = ssl.create_default_context() - context.check_hostname = False - context.verify_mode = ssl.CERT_NONE + # The most robust way to bypass verification for self-signed certs + context = ssl._create_unverified_context() return context return super().ssl_context