Merge lp://staging/~cmiller/django-openid-auth/encode-redirected-uris-better into lp://staging/~django-openid-auth/django-openid-auth/trunk
Proposed by
Chad Miller
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 93 | ||||
Proposed branch: | lp://staging/~cmiller/django-openid-auth/encode-redirected-uris-better | ||||
Merge into: | lp://staging/~django-openid-auth/django-openid-auth/trunk | ||||
Diff against target: |
15 lines (+5/-1) 1 file modified
django_openid_auth/views.py (+5/-1) |
||||
To merge this branch: | bzr merge lp://staging/~cmiller/django-openid-auth/encode-redirected-uris-better | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Facundo Batista (community) | Approve | ||
django-openid-auth developers | Pending | ||
Review via email: mp+108035@code.staging.launchpad.net |
Commit message
LP#936153, After login, redirecting to a URL that contains non-ASCII characters would fail because the naive "str(foo)" scheme used in urllib would use the default system encoding, which we can't trust at all.
To post a comment you must log in.
Encoding to UTF8 will give you a sequence of bytes with two or more values > 127 for each unicode character, and urllib.urlencode will transform those into encoded values, like:
>>> urllib. urlencode( dict(foo= u"moño" .encode( "utf8") ))
'foo=mo%C3%B1o'
This is something that I saw a lot, so I think it's ok, but I'm no expert in URLs.