FIX #938 FastDL Password

This commit is contained in:
Ulrich Block 2017-05-13 10:48:11 +02:00
parent 0f1937b2ae
commit eaffd5660b
2 changed files with 15 additions and 2 deletions

View File

@ -435,6 +435,19 @@ class ValidateUserinput {
return false;
}
function ftpPassword ($value, $length, $type, $object = false) {
$check = $this->if_obj_or_str($value, $type, $object);
if ($check and is_string($check) and preg_match('/^((?![\.\(\)\,])[\w\S]){6,' . $length . '}$/', trim($check))) {
return trim($check);
} else if ($check) {
return $this->loop($check, 'ftpPassword', $type, $length);
}
return false;
}
function captcha ($value, $type, $object = false) {
$check = $this->if_obj_or_str($value, $type, $object);

View File

@ -130,7 +130,7 @@ if ($ui->st('d', 'get') == 'ud' and $ui->id('id', 10, 'get') and (!isset($_SESSI
$ftp_adresse = $ui->domain('ftp_adresse', 'post');
}
$ftp_password = $ui->password('ftp_password', 255, 'post');
$ftp_password = $ui->ftpPassword('ftp_password', 255, 'post');
$ftp_port = $ui->port('ftp_port', 'post');
$ftp_user = $ui->username('ftp_user', 50, 'post');
$ftp_path = $ui->path('ftp_path', 'post');
@ -213,7 +213,7 @@ if ($ui->st('d', 'get') == 'ud' and $ui->id('id', 10, 'get') and (!isset($_SESSI
$ftp_adresse = $ui->domain('ftp_adresse', 'post');
}
$ftp_password = $ui->password('ftp_password', 255, 'post');
$ftp_password = $ui->ftpPassword('ftp_password', 255, 'post');
$ftp_port = $ui->port('ftp_port', 'post');
$ftp_user = $ui->username('ftp_user', 50, 'post');
$ftp_path = $ui->path('ftp_path', 'post');