From 47b7de00d45872f1656d4db2d5a8af3070478c6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 22 Aug 2013 15:15:39 -0300 Subject: Make username lower case before using them --- changes/bug_username_to_lower | 2 ++ src/leap/bitmask/crypto/srpauth.py | 3 +++ src/leap/bitmask/crypto/srpregister.py | 3 +++ 3 files changed, 8 insertions(+) create mode 100644 changes/bug_username_to_lower diff --git a/changes/bug_username_to_lower b/changes/bug_username_to_lower new file mode 100644 index 00000000..284567e4 --- /dev/null +++ b/changes/bug_username_to_lower @@ -0,0 +1,2 @@ + o Transforms usernames to lower case before they are used in the + registration and authentication. Closes #3541. \ No newline at end of file diff --git a/src/leap/bitmask/crypto/srpauth.py b/src/leap/bitmask/crypto/srpauth.py index 55fff82b..7b91205f 100644 --- a/src/leap/bitmask/crypto/srpauth.py +++ b/src/leap/bitmask/crypto/srpauth.py @@ -193,6 +193,9 @@ class SRPAuth(QtCore.QObject): :type password: str """ logger.debug("Authentication preprocessing...") + + username = username.lower() + self._srp_user = self._srp.User(username, password, self._hashfun, diff --git a/src/leap/bitmask/crypto/srpregister.py b/src/leap/bitmask/crypto/srpregister.py index c69294d7..5c0a8efc 100644 --- a/src/leap/bitmask/crypto/srpregister.py +++ b/src/leap/bitmask/crypto/srpregister.py @@ -107,6 +107,9 @@ class SRPRegister(QtCore.QObject): :rtype: tuple :rparam: (ok, request) """ + + username = username.lower() + salt, verifier = self._srp.create_salted_verification_key( username, password, -- cgit v1.2.3