Skip to content

Commit

Permalink
Merge pull request #404 from johngian/fix-373
Browse files Browse the repository at this point in the history
Fix url encoding using escaped space characters
  • Loading branch information
akatsoulas committed Mar 25, 2021
2 parents b704982 + 509676c commit f5dc420
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mozilla_django_oidc/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
add_state_and_nonce_to_session,
import_from_settings)

from urllib.parse import urlencode
from urllib.parse import quote, urlencode

try:
# Python 3.7 or later
Expand Down Expand Up @@ -160,7 +160,7 @@ def process_request(self, request):

request.session['oidc_login_next'] = request.get_full_path()

query = urlencode(params)
query = urlencode(params, quote_via=quote)
redirect_url = '{url}?{query}'.format(url=auth_url, query=query)
if request.headers.get('x-requested-with') == 'XMLHttpRequest':
# Almost all XHR request handling in client-side code struggles
Expand Down

0 comments on commit f5dc420

Please sign in to comment.