From 53dd4e31bfd72769714268e7f2848aff79e1646a Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Thu, 12 Dec 2024 16:54:12 +0100 Subject: close QMailAuthuser after successful login --- src/jwebmail/__init__.py | 2 +- src/jwebmail/read_mails.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/jwebmail/__init__.py b/src/jwebmail/__init__.py index 904c3b8..d3e8ee1 100644 --- a/src/jwebmail/__init__.py +++ b/src/jwebmail/__init__.py @@ -36,7 +36,7 @@ else: toml_read_file = dict(load=toml_load, text=True) -__version__ = "2.8.3.dev0" +__version__ = "2.8.3.dev1" csrf = CSRFProtect() diff --git a/src/jwebmail/read_mails.py b/src/jwebmail/read_mails.py index f88ce46..e43e7c3 100644 --- a/src/jwebmail/read_mails.py +++ b/src/jwebmail/read_mails.py @@ -175,13 +175,15 @@ def _build_qma(domain): def login(username, password): _, domain = username.split("@") try: - _build_qma(domain).open(username, password) + qma = _build_qma(domain).open(username, password) except QMAuthError as err: if err.rc == 1: return False else: raise + qma.close() + r = _select_timeout_session() r.set(username, password) r.close() -- cgit v1.2.3