Skip to content

Commit

Permalink
Fix comparison behavior on Python 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Jul 26, 2019
1 parent b29c298 commit eba4805
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pyotp/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ def strings_equal(s1, s2):
"""
s1 = unicodedata.normalize('NFKC', s1)
s2 = unicodedata.normalize('NFKC', s2)
return compare_digest(s1.encode(), s2.encode())
return compare_digest(s1.encode("utf-8"), s2.encode("utf-8"))

0 comments on commit eba4805

Please sign in to comment.