From de8a1aa5dac5cff9575fda39b82c5cc7e0abb715 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Mon, 9 Mar 2020 16:09:15 +0000 Subject: [PATCH] Revert "Turn the chosen username to lowercase" This reverts commit ea7ba3e9696af2a894eeafb2dcbdb9caacbe5453. --- matrix_synapse_saml_mozilla/res/script.js | 4 +--- matrix_synapse_saml_mozilla/username_picker.py | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/matrix_synapse_saml_mozilla/res/script.js b/matrix_synapse_saml_mozilla/res/script.js index 7704ecf..1fa4e39 100644 --- a/matrix_synapse_saml_mozilla/res/script.js +++ b/matrix_synapse_saml_mozilla/res/script.js @@ -65,9 +65,7 @@ let submitUsername = function(username) { return; } - // Since we're trying to register the username converted to lower case, check the - // availability with the right case. - let check_uri = 'check?' + buildQueryString({"username": username.toLowerCase()}); + let check_uri = 'check?' + buildQueryString({"username": username}); fetch(check_uri, { "credentials": "include", }).then((response) => { diff --git a/matrix_synapse_saml_mozilla/username_picker.py b/matrix_synapse_saml_mozilla/username_picker.py index 36f7854..7990d4b 100644 --- a/matrix_synapse_saml_mozilla/username_picker.py +++ b/matrix_synapse_saml_mozilla/username_picker.py @@ -155,8 +155,6 @@ class SubmitResource(AsyncResource): _return_html_error(400, "missing username", request) return localpart = request.args[b"username"][0].decode("utf-8", errors="replace") - # Convert the username to lower case. - localpart = localpart.lower() logger.info("Registering username %s", localpart) try: registered_user_id = await self._module_api.register_user(