diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/jwebmail/__init__.py | 2 | ||||
-rw-r--r-- | src/jwebmail/read_mails.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/jwebmail/__init__.py b/src/jwebmail/__init__.py index 04b9e2a..25681d1 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.4.0.dev2" +__version__ = "2.4.0.dev3" csrf = CSRFProtect() diff --git a/src/jwebmail/read_mails.py b/src/jwebmail/read_mails.py index 324b4d0..b7e5984 100644 --- a/src/jwebmail/read_mails.py +++ b/src/jwebmail/read_mails.py @@ -92,7 +92,7 @@ class SqliteTimeoutSession: def set(self, key, value): with closing(self.conn.cursor()) as cur: cur.execute( - "REPLACE INTO session VALUES (?, ?, unixepoch('now', format('%d seconds', ?)))", + "INSERT OR REPLACE INTO session VALUES (?, ?, unixepoch('now', format('%d seconds', ?)))", [key, value, self.timeout], ) self.conn.commit() @@ -117,7 +117,7 @@ def select_timeout_session(): session_type = current_app.config["JWEBMAIL"]["READ_MAILS"]["SESSION_TYPE"] user = "jwebmail" - passwd = current_app.config["JWEBMAIL"]["READ_MAILS"]["SESSION_STORE_PASSWD"] + passwd = current_app.config["JWEBMAIL"]["READ_MAILS"].get("SESSION_STORE_PASSWD") args = dict() db_name = current_app.config["JWEBMAIL"]["READ_MAILS"].get("SESSION_STORE_DB_NAME") if db_name: |