Support UTF8 encoded URLs in community authentication
authorMagnus Hagander <magnus@hagander.net>
Thu, 6 Dec 2012 18:14:38 +0000 (19:14 +0100)
committerMagnus Hagander <magnus@hagander.net>
Thu, 6 Dec 2012 18:15:46 +0000 (19:15 +0100)
Commit 8b3726b7d866d614c842ca90593187e726a6cf3e fixed this for all
login fields except the URL redirect field (such as the users name).
But the wiki in particular uses UTF8 in the URLs, so we need to deal
with them in the URL as well.

pgweb/account/views.py

index 468c558feb10dc2fad9bc534b81f3f59caf62cc9..cb3fc061e88a15005397ab88b993b54db6b137fe 100644 (file)
@@ -257,7 +257,7 @@ def communityauth(request, siteid):
                'e': request.user.email.encode('utf-8'),
                }
        if su:
-               info['su'] = request.GET['su']
+               info['su'] = request.GET['su'].encode('utf-8')
 
        # Turn this into an URL. Make sure the timestamp is always first, that makes
        # the first block more random..