Merge pull request #81 from ovh/remote_user_name_fix

fix: is_valid_remote_user: extend allowed size from 32 to 128
This commit is contained in:
Stéphane Lesimple 2020-12-08 11:43:05 +01:00 committed by GitHub
commit 9f745013b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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");