changeset 2303:4f73af30fd75

fix return_to URL in OpenID preferences
author Johannes Berg <johannes AT sipsolutions DOT net>
date Wed, 11 Jul 2007 11:38:56 +0200
parents 1f449e482bcc
children 8eb96bfafef9
files MoinMoin/userprefs/oid.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/userprefs/oid.py	Tue Jul 10 19:31:27 2007 +0200
+++ b/MoinMoin/userprefs/oid.py	Wed Jul 11 11:38:56 2007 +0200
@@ -69,7 +69,8 @@
             qstr = wikiutil.makeQueryString({'action': 'userprefs',
                                              'handler': 'oid',
                                              'oid.return': '1'})
-            return_to = ''.join([request.getBaseURL(), '?', qstr])
+            return_to = '%s/%s' % (request.getBaseURL(),
+                                   request.page.url(request, qstr))
             trust_root = request.getBaseURL()
             if oidreq.shouldSendRedirect():
                 redirect_url = oidreq.redirectURL(trust_root, return_to)
@@ -92,7 +93,8 @@
         qstr = wikiutil.makeQueryString({'action': 'userprefs',
                                          'handler': 'oid',
                                          'oid.return': '1'})
-        return_to = ''.join([request.getBaseURL(), '?', qstr])
+        return_to = '%s/%s' % (request.getBaseURL(),
+                               request.page.url(request, qstr))
         info = oidconsumer.complete(query, return_to=return_to)
         if info.status == consumer.FAILURE:
             return _('OpenID error: %s.') % info.message