Module: check_mk
Branch: master
Commit: 6528a45b3988457891cd4d3ffbe1cd8cbb6a887e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6528a45b398845…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jul 1 13:56:08 2016 +0200
Single user session: Fixed bug when no session info present for user
---
web/htdocs/userdb.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/userdb.py b/web/htdocs/userdb.py
index 5ae219f..bd20b6a 100644
--- a/web/htdocs/userdb.py
+++ b/web/htdocs/userdb.py
@@ -333,7 +333,12 @@ def is_valid_user_session(username, session_id):
if config.single_user_session == None:
return True # No login session limitation enabled, no validation
- active_session_id, last_activity = load_session_info(username)
+ session_info = load_session_info(username)
+ if session_info == None:
+ return False # no session active
+ else:
+ active_session_id, last_activity = session_info
+
if session_id == active_session_id:
return True # Current session. Fine.