Do not allow username to have space at the beginning or at the end
fixes #22035
This commit is contained in:
parent
4777f78187
commit
879917f5f1
|
@ -776,6 +776,12 @@ $(document).ready(function () {
|
||||||
t('settings', 'Error creating user'));
|
t('settings', 'Error creating user'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if ($.trim(username).length !== username.length) {
|
||||||
|
OC.dialogs.alert(
|
||||||
|
t('settings', 'Username contains whitespace at the beginning or at the end'),
|
||||||
|
t('settings', 'Error creating user'));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if ($.trim(password) === '') {
|
if ($.trim(password) === '') {
|
||||||
OC.dialogs.alert(
|
OC.dialogs.alert(
|
||||||
t('settings', 'A valid password must be provided'),
|
t('settings', 'A valid password must be provided'),
|
||||||
|
|
Loading…
Reference in New Issue