2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-13 01:40:26 +00:00

Fix issue 4507, add parameter check for rspconfig admin_passwd

This commit is contained in:
XuWei
2017-12-13 20:33:06 -05:00
parent fb0c523d2c
commit edc61487a4

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;