Merge pull request #2771 from jmoenig/trim-usernames

Trim usernames on signup
pull/95/head
Jens Mönig 2021-02-04 23:19:27 +01:00 zatwierdzone przez GitHub
commit 9c3cc93fdd
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
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)