summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2024-12-12 16:54:12 +0100
committerJannis M. Hoffmann <jannis@fehcom.de>2024-12-12 16:54:12 +0100
commit53dd4e31bfd72769714268e7f2848aff79e1646a (patch)
tree4251f5df87206ceae2eb97dc2f151a4660e1f9ef
parent0237cc4bac0dafa9a3f3013b3f48e4f2941963bd (diff)
close QMailAuthuser after successful loginmain
-rw-r--r--src/jwebmail/__init__.py2
-rw-r--r--src/jwebmail/read_mails.py4
2 files changed, 4 insertions, 2 deletions
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()