summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/crypto/srpauth.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-10-30 13:02:47 -0300
committerTomás Touceda <chiiph@leap.se>2013-10-30 13:02:47 -0300
commita365958532bf4b2676a9337bf40f3b67bdf473d1 (patch)
tree8ebc9ac1a842d005832c4073994ccd2e1c31eda7 /src/leap/bitmask/crypto/srpauth.py
parentd28cb4d97c15952070f1bd2b737264686b025836 (diff)
parent1198f8484f0a6c89a610cd9aabcf30d2f43c832e (diff)
Merge remote-tracking branch 'ivan/bug/4003_fix-non-ascii-password-change' into develop
Diffstat (limited to 'src/leap/bitmask/crypto/srpauth.py')
-rw-r--r--src/leap/bitmask/crypto/srpauth.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/leap/bitmask/crypto/srpauth.py b/src/leap/bitmask/crypto/srpauth.py
index 93fb740f..ab98850d 100644
--- a/src/leap/bitmask/crypto/srpauth.py
+++ b/src/leap/bitmask/crypto/srpauth.py
@@ -217,10 +217,9 @@ class SRPAuth(QtCore.QObject):
"""
logger.debug("Authentication preprocessing...")
- self._srp_user = self._srp.User(username,
- password,
- self._hashfun,
- self._ng)
+ self._srp_user = self._srp.User(username.encode('utf-8'),
+ password.encode('utf-8'),
+ self._hashfun, self._ng)
_, A = self._srp_user.start_authentication()
self._srp_a = A
@@ -487,7 +486,8 @@ class SRPAuth(QtCore.QObject):
self.get_uid())
salt, verifier = self._srp.create_salted_verification_key(
- self._username, new_password, self._hashfun, self._ng)
+ self._username.encode('utf-8'), new_password.encode('utf-8'),
+ self._hashfun, self._ng)
cookies = {self.SESSION_ID_KEY: self.get_session_id()}
headers = {
@@ -518,9 +518,9 @@ class SRPAuth(QtCore.QObject):
Might raise SRPAuthenticationError
:param username: username for this session
- :type username: str
+ :type username: unicode
:param password: password for this user
- :type password: str
+ :type password: unicode
:returns: A defer on a different thread
:rtype: twisted.internet.defer.Deferred