diff --git a/deluge/ui/web/auth.py b/deluge/ui/web/auth.py index 19cc45571..88ab81edf 100644 --- a/deluge/ui/web/auth.py +++ b/deluge/ui/web/auth.py @@ -121,8 +121,10 @@ class Auth(JSONComponent): m.update(str(random.getrandbits(40))) m.update(m.hexdigest()) session_id = m.hexdigest() + + config = component.get("DelugeWeb").config - expires = int(time.time()) + 3600 + expires = int(time.time()) + config["session_timeout"] expires_str = time.strftime('%a, %d %b %Y %H:%M:%S UTC', time.gmtime(expires)) @@ -298,4 +300,4 @@ class Auth(JSONComponent): log.debug("Failed to detect the login method") d.callback(False) - return d \ No newline at end of file + return d diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py index be242ec93..a1290e26b 100644 --- a/deluge/ui/web/server.py +++ b/deluge/ui/web/server.py @@ -85,6 +85,7 @@ CONFIG_DEFAULTS = { "pwd_salt": "c26ab3bbd8b137f99cd83c2c1c0963bcc1a35cad", "pwd_sha1": "2ce1a410bcdcc53064129b6d950f2e9fee4edc1e", "base": "", + "session_timeout": 3600, "sessions": {}, "sidebar_show_zero": False, "sidebar_show_trackers": False,