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(