fix: is_valid_remote_user: extend allowed size from 32 to 128

This commit is contained in:
Stéphane Lesimple 2020-12-08 10:20:25 +00:00
parent a1fc6f3c1c
commit 18d8195027
No known key found for this signature in database
GPG key ID: 4B4A3289E9D35658

View file

@ -568,7 +568,7 @@ sub is_valid_port {
sub is_valid_remote_user {
my %params = @_;
my $user = $params{'user'};
if ($user =~ /^([a-zA-Z0-9._!-]{1,32})$/) {
if ($user =~ /^([a-zA-Z0-9._!-]{1,128})$/) {
return R('OK', value => $1);
}
return R('ERR_INVALID_PARAMETER', msg => "Specified user doesn't seem to be valid");