From 060a7a7b3dfae1127de58f366e81b12271522d4a Mon Sep 17 00:00:00 2001 From: Jessica Tallon Date: Mon, 8 Dec 2014 17:00:33 +0000 Subject: [PATCH] Fix #1057 - unquote redirection URL on successful OAuth authorization --- mediagoblin/oauth/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mediagoblin/oauth/views.py b/mediagoblin/oauth/views.py index 1b7c789a..1b4787d6 100644 --- a/mediagoblin/oauth/views.py +++ b/mediagoblin/oauth/views.py @@ -15,6 +15,7 @@ # along with this program. If not, see . import datetime +import urllib import six @@ -313,10 +314,13 @@ def authorize_finish(request): oauth_request.verifier ) + # It's come from the OAuth headers so it'll be encoded. + redirect_url = urllib.unquote(oauth_request.callback) + return redirect( request, querystring=querystring, - location=oauth_request.callback + location=redirect_url ) @csrf_exempt -- 2.25.1