diff options
author | Patrick Uiterwijk <puiterwijk@redhat.com> | 2015-03-03 04:39:05 +0100 |
---|---|---|
committer | Patrick Uiterwijk <puiterwijk@redhat.com> | 2015-03-03 16:32:37 +0100 |
commit | 06b387bcc632a8db9e812c9069247b10fe2b9695 (patch) | |
tree | 5d5d185892128be6fd583b0859548a5873d9b83a | |
parent | 13b359d8e4682fb239cf02293aef3a1b235a2cf6 (diff) | |
download | ipsilon-06b387bcc632a8db9e812c9069247b10fe2b9695.tar.gz ipsilon-06b387bcc632a8db9e812c9069247b10fe2b9695.tar.xz ipsilon-06b387bcc632a8db9e812c9069247b10fe2b9695.zip |
Fix transaction ID passing for failed authentication
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
-rw-r--r-- | ipsilon/login/common.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ipsilon/login/common.py b/ipsilon/login/common.py index 4b715f3..60f6df1 100644 --- a/ipsilon/login/common.py +++ b/ipsilon/login/common.py @@ -37,9 +37,12 @@ class LoginManagerBase(PluginConfig, PluginObject): self.path = '/' self.info = None - def redirect_to_path(self, path): + def redirect_to_path(self, path, trans=None): base = cherrypy.config.get('base.mount', "") - raise cherrypy.HTTPRedirect('%s/login/%s' % (base, path)) + url = '%s/login/%s' % (base, path) + if trans: + url += '?%s' % trans.get_GET_arg() + raise cherrypy.HTTPRedirect(url) def auth_successful(self, trans, username, auth_type=None, userdata=None): session = UserSession() @@ -100,7 +103,7 @@ class LoginManagerBase(PluginConfig, PluginObject): # try with next module next_login = self.next_login() if next_login: - return self.redirect_to_path(next_login.path) + return self.redirect_to_path(next_login.path, trans) # return to the caller if any session = UserSession() |