Trim usernames on signup

This only applies to signups. We should also do this on the backend too.
pull/95/head
Michael Ball 2021-02-04 10:43:32 -08:00
rodzic 9466b13816
commit d0e72f3f9b
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -352,7 +352,7 @@ Cloud.prototype.login = function (
};
Cloud.prototype.signup = function (
username,
username,
password,
passwordRepeat,
email,
@ -361,7 +361,7 @@ Cloud.prototype.signup = function (
) {
this.request(
'POST',
'/users/' + encodeURIComponent(username) + '?' + this.encodeDict({
'/users/' + encodeURIComponent(username.trim()) + '?' + this.encodeDict({
email: email,
password: hex_sha512(password),
password_repeat: hex_sha512(passwordRepeat)