diff options
author | Jessica Tallon <jessica@megworld.co.uk> | 2014-12-08 17:00:33 +0000 |
---|---|---|
committer | Jessica Tallon <jessica@megworld.co.uk> | 2014-12-08 17:00:33 +0000 |
commit | 060a7a7b3dfae1127de58f366e81b12271522d4a (patch) | |
tree | 953b206812be8b1f72894c44232af65281c393e2 /mediagoblin/oauth/views.py | |
parent | 35885226061c997d6e95a387d231ddd98dacb4de (diff) | |
download | mediagoblin-060a7a7b3dfae1127de58f366e81b12271522d4a.tar.lz mediagoblin-060a7a7b3dfae1127de58f366e81b12271522d4a.tar.xz mediagoblin-060a7a7b3dfae1127de58f366e81b12271522d4a.zip |
Fix #1057 - unquote redirection URL on successful OAuth authorization
Diffstat (limited to 'mediagoblin/oauth/views.py')
-rw-r--r-- | mediagoblin/oauth/views.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 <http://www.gnu.org/licenses/>. 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 |