Don't assume data is ASCII in saslprep.
This commit is contained in:
parent
261a501afc
commit
021c57205f
2
sleekxmpp/thirdparty/suelta/saslprep.py
vendored
2
sleekxmpp/thirdparty/suelta/saslprep.py
vendored
@ -16,7 +16,7 @@ def saslprep(text, strict=True):
|
|||||||
|
|
||||||
if sys.version_info < (3, 0):
|
if sys.version_info < (3, 0):
|
||||||
if type(text) == str:
|
if type(text) == str:
|
||||||
text = text.decode('us-ascii')
|
text = text.decode('utf-8')
|
||||||
|
|
||||||
# Mapping:
|
# Mapping:
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user