mirror of
https://github.com/myvesta/vesta
synced 2025-07-06 04:51:54 -07:00
Proper fix for the prefix corruption (for user names with non-alphanumeric characters)
and keep the prevention of addition of ftp user names with non-alphanumeric characters as it was intended initially
This commit is contained in:
parent
a32b604ecd
commit
cc456f20b5
2 changed files with 4 additions and 4 deletions
|
@ -3,11 +3,11 @@ App.Actions.WEB.update_ftp_username_hint = function(elm, hint) {
|
|||
$(elm).parent().find('.hint').html('');
|
||||
}
|
||||
|
||||
//hint = hint.replace(/[^\w\d]/gi, '');
|
||||
|
||||
if (hint.indexOf(GLOBAL.FTP_USER_PREFIX) == 0) {
|
||||
hint = hint.slice(GLOBAL.FTP_USER_PREFIX.length, hint.length);
|
||||
}
|
||||
hint = hint.replace(/[^\w\d]/gi, '');
|
||||
|
||||
$(elm).parent().find('.v-ftp-user').val(hint);
|
||||
$(elm).parent().find('.hint').text(GLOBAL.FTP_USER_PREFIX + hint);
|
||||
}
|
||||
|
|
|
@ -3,11 +3,11 @@ App.Actions.WEB.update_ftp_username_hint = function(elm, hint) {
|
|||
$(elm).parent().find('.hint').html('');
|
||||
}
|
||||
|
||||
//hint = hint.replace(/[^\w\d]/gi, '');
|
||||
|
||||
if (hint.indexOf(GLOBAL.FTP_USER_PREFIX) == 0) {
|
||||
hint = hint.slice(GLOBAL.FTP_USER_PREFIX.length, hint.length);
|
||||
}
|
||||
hint = hint.replace(/[^\w\d]/gi, '');
|
||||
|
||||
$(elm).parent().find('.v-ftp-user').val(hint);
|
||||
$(elm).parent().find('.hint').text(GLOBAL.FTP_USER_PREFIX + hint);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue