Author: damoxc
Revision: 5675
Log:
change the session timeout to be configurable
Diff:
Modified: trunk/deluge/ui/web/auth.py
===================================================================
--- trunk/deluge/ui/web/auth.py 2009-08-17 20:21:02 UTC (rev 5674)
+++ trunk/deluge/ui/web/auth.py 2009-08-18 22:04:58 UTC (rev 5675)
@@ -121,8 +121,10 @@
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 @@
log.debug("Failed to detect the login method")
d.callback(False)
- return d
\ No newline at end of file
+ return d
Modified: trunk/deluge/ui/web/server.py
===================================================================
--- trunk/deluge/ui/web/server.py 2009-08-17 20:21:02 UTC (rev 5674)
+++ trunk/deluge/ui/web/server.py 2009-08-18 22:04:58 UTC (rev 5675)
@@ -85,6 +85,7 @@
"pwd_salt": "c26ab3bbd8b137f99cd83c2c1c0963bcc1a35cad",
"pwd_sha1": "2ce1a410bcdcc53064129b6d950f2e9fee4edc1e",
"base": "",
+ "session_timeout": 3600,
"sessions": {},
"sidebar_show_zero": False,
"sidebar_show_trackers": False,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---