fix for ftp change password bug

This commit is contained in:
Serghey Rodin 2013-02-14 19:05:12 +02:00
commit a3a1ee5138
3 changed files with 9 additions and 33 deletions

View file

@ -565,7 +565,7 @@ validate_format_name() {
# Username
validate_format_username() {
if ! [[ "$1" =~ ^[a-zA-Z0-9]+([\.|_|-][a-zA-Z0-9]+)?$ ]]; then
if ! [[ "$1" =~ ^[a-zA-Z0-9][-|\.|_|a-zA-Z0-9]{0,28}[a-zA-Z0-9]$ ]]; then
echo "Error: $2 $1 is not valid"
log_event "$E_INVALID" "$EVENT"
exit $E_INVALID