changeset 5381:105451cabedb

fix auth methods that use redirects (like openid)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 15 Dec 2009 22:03:39 +0100
parents 2320e8f36ac9
children 942766fe487d
files MoinMoin/auth/__init__.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/auth/__init__.py	Tue Dec 15 06:15:01 2009 +0100
+++ b/MoinMoin/auth/__init__.py	Tue Dec 15 22:03:39 2009 +0100
@@ -137,6 +137,8 @@
 from MoinMoin import log
 logging = log.getLogger(__name__)
 
+from werkzeug import redirect, abort, url_quote, url_quote_plus
+
 from MoinMoin import user, wikiutil
 
 
@@ -407,8 +409,8 @@
         if ret.redirect_to:
             nextstage = get_multistage_continuation_url(request, authmethod.name)
             url = ret.redirect_to
-            url = url.replace('%return_form', quote_plus(nextstage))
-            url = url.replace('%return', quote(nextstage))
+            url = url.replace('%return_form', url_quote_plus(nextstage))
+            url = url.replace('%return', url_quote(nextstage))
             abort(redirect(url))
         msg = ret.message
         if msg and not msg in request._login_messages: