From 324b71c3af26955fd2662d89c0034cb75d18aa2d Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sat, 13 Jul 2013 19:10:12 -0500 Subject: [PATCH] fixed issue 1582:Cannot login_bare in a web2py shell, thanks Alan --- VERSION | 2 +- gluon/globals.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 4acd8a5f..b28d5df9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.07.12.11.57.25 +Version 2.6.0-development+timestamp.2013.07.13.19.09.25 diff --git a/gluon/globals.py b/gluon/globals.py index 3aafea1f..bb10b89a 100644 --- a/gluon/globals.py +++ b/gluon/globals.py @@ -506,7 +506,7 @@ class Session(Storage): #check if session is separate separate = None - if response.session_id[2:3] == "/": + if response.session and response.session_id[2:3] == "/": separate = lambda session_name: session_name[-2:] self._unlock(response) @@ -589,8 +589,9 @@ class Session(Storage): response.session_db_unique_key = unique_key rcookies = response.cookies - rcookies[response.session_id_name] = response.session_id - rcookies[response.session_id_name]['path'] = '/' + if response.session_id_name: + rcookies[response.session_id_name] = response.session_id + rcookies[response.session_id_name]['path'] = '/' if clear_session: self.clear()