From 738059f56a0872ac9abf559d23da0ab2efe8bada Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 19 Sep 2012 23:04:10 -0500 Subject: [PATCH] fixed a problem with reset_password redirect loop --- VERSION | 2 +- gluon/tools.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 2c74dec2..4d0f352a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.0.9 (2012-09-19 00:03:03) stable +Version 2.0.9 (2012-09-19 23:04:04) stable diff --git a/gluon/tools.py b/gluon/tools.py index 6c1d21ad..6130a226 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -1197,7 +1197,7 @@ class Auth(object): 'reset_password','request_reset_password', 'change_password','profile','groups', 'impersonate','not_authorized'): - if len(request.args) >= 2: + if len(request.args) >= 2 and args[0]=='impersonate': return getattr(self,args[0])(request.args[1]) else: return getattr(self,args[0])() @@ -2445,7 +2445,7 @@ class Auth(object): session = current.session if next is DEFAULT: - next = self.settings.reset_password_next + next = self.next or self.settings.reset_password_next try: key = request.vars.key or getarg(-1) t0 = int(key.split('-')[0])