Fix #1057 - unquote redirection URL on successful OAuth authorization

This commit is contained in:
Jessica Tallon 2014-12-08 17:00:33 +00:00
parent 3588522606
commit 060a7a7b3d

View File

@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import datetime import datetime
import urllib
import six import six
@ -313,10 +314,13 @@ def authorize_finish(request):
oauth_request.verifier oauth_request.verifier
) )
# It's come from the OAuth headers so it'll be encoded.
redirect_url = urllib.unquote(oauth_request.callback)
return redirect( return redirect(
request, request,
querystring=querystring, querystring=querystring,
location=oauth_request.callback location=redirect_url
) )
@csrf_exempt @csrf_exempt