Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode error with UTF-8 string in next #229

Closed
nijel opened this issue Mar 27, 2014 · 1 comment
Closed

Unicode error with UTF-8 string in next #229

nijel opened this issue Mar 27, 2014 · 1 comment

Comments

@nijel
Copy link
Contributor

nijel commented Mar 27, 2014

I'm using Django app and when next URL parameter contains unicode (UTF-8) string, the authentication fails with following exception:

  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 114, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)

  File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/utils.py", line 45, in wrapper
    return func(request, backend, *args, **kwargs)

  File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/views.py", line 12, in auth
    return do_auth(request.social_strategy, redirect_name=REDIRECT_FIELD_NAME)

  File "/usr/local/lib/python2.7/dist-packages/social/actions.py", line 20, in do_auth
    redirect_uri)

  File "/usr/local/lib/python2.7/dist-packages/social/utils.py", line 55, in sanitize_redirect
    not isinstance(redirect_to.decode(), six.string_types):

UnicodeEncodeError: 'ascii' codec can't encode character u'\xe6' in position 21: ordinal not in range(128)
@omab
Copy link
Owner

omab commented Mar 27, 2014

The fix for this was released yesterday, #191 was raised for that. Reopen the ticket if needed.

@omab omab closed this as completed Mar 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants