diff options
Diffstat (limited to 'src/jwebmail/read_mails.py')
-rw-r--r-- | src/jwebmail/read_mails.py | 4 |
1 files changed, 2 insertions, 2 deletions
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: |