On Thu, Aug 8, 2013 at 9:22 PM, Carlos Correia <car...@memoriapersistente.pt > wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Em 08-08-2013 20:23, Ricardo Pedroso escreveu: > > On Thu, Aug 8, 2013 at 2:36 PM, Carlos Correia < > car...@memoriapersistente.pt > > <mailto:car...@memoriapersistente.pt>> wrote: > > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Hi, > > > > I'm facing a bug when I redirect to another controller, that > redirects the user > > to the login prompt, after having been authenticated. > > > > > > It's hard to tell what the problem is but for me it seems that web2py is > failing > > to load the > > session data. > > If you dont mind to tweak your gluon/globals.py you could add a raise > statement > > to reraise some exceptions that are been swallowed when web2py tries to > load the > > session data. > > And where/how should I do that? > Depends on what kind of sessions you use, supposing you are using file sessions: in gluon/globals.py around line 674 you have this: .... try: response.session_file = \ open(response.session_filename, 'rb+') try: portalocker.lock(response.session_file, portalocker.LOCK_EX) response.session_locked = True self.update(cPickle.load(response.session_file)) response.session_file.seek(0) oc = response.session_filename.split('/')[-1]\ .split('-')[0] if check_client and client != oc: raise Exception("cookie attack") except: response.session_id = None finally: pass #This causes admin login to break. Must find out why. #self._close(response) except: response.session_file = None if not response.session_id: After those two except's append a line with raise eg: except: raise This will reraise any exception that may happen. Ricardo -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.