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

Fix normalization of non-ASCII query strings on Python 2 #47

Merged
merged 1 commit into from Sep 2, 2020

Conversation

cjwatson
Copy link

@cjwatson cjwatson commented Aug 17, 2020

urinorm currently deals with encoding issues when normalizing the path,
but not the query string. However, in some cases it can happen that the
query string contains non-ASCII characters, particularly if using
https://openid.net/specs/openid-simple-registration-extension-1_0.html
in which case the user's full name may very well not be entirely ASCII;
on Python 2 this resulted in a UnicodeEncodeError in urlencode. Work
around this.

urinorm currently deals with encoding issues when normalizing the path,
but not the query string.  However, in some cases it can happen that the
query string contains non-ASCII characters, particularly if using
https://openid.net/specs/openid-simple-registration-extension-1_0.html
in which case the user's full name may very well not be entirely ASCII;
on Python 2 this resulted in a UnicodeEncodeError in urlencode.  Work
around this.
@codecov-commenter
Copy link

codecov-commenter commented Aug 17, 2020

Codecov Report

Merging #47 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #47   +/-   ##
=======================================
  Coverage   89.52%   89.52%           
=======================================
  Files          93       93           
  Lines       12058    12063    +5     
  Branches     1089     1090    +1     
=======================================
+ Hits        10795    10800    +5     
  Misses       1094     1094           
  Partials      169      169           
Impacted Files Coverage Δ
openid/test/test_urinorm.py 100.00% <100.00%> (ø)
openid/urinorm.py 91.39% <100.00%> (+0.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d093a09...a2cb8bc. Read the comment docs.

ziima
ziima approved these changes Sep 2, 2020
Copy link
Owner

@ziima ziima left a comment

Thanks for the fix.

@ziima
Copy link
Owner

ziima commented Sep 2, 2020

Travis CI finished successfully. Looks like it just didn't update the PR.

@ziima ziima merged commit afa6ada into ziima:master Sep 2, 2020
2 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants