2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-23 14:35:38 +00:00

Merge pull request #4516 from xuweibj/I4507

Fix issue 4507, add parameter check for rspconfig admin_passwd
This commit is contained in:
Yuan Bai
2017-12-14 09:53:53 +08:00
committed by GitHub

View File

@ -993,6 +993,9 @@ sub parse_args {
if ($key eq "admin_passwd") {
my $comma_num = $value =~ tr/,/,/;
return ([ 1, "Invalid parameter for option $key: $value" ]) if ($comma_num != 1);
if ($subcommand =~ /^admin_passwd=(.*),(.*)/) {
return ([ 1, "Invalid parameter for option $key: $value" ]) if ($1 eq "" or $2 eq "");
}
}
my $nodes_num = @$noderange;